this is working

This commit is contained in:
2025-07-29 11:08:33 +00:00
parent 192094c23a
commit a648a67a0c
287 changed files with 29278 additions and 73 deletions

View File

@@ -50,11 +50,12 @@ function posts_by_service($numberposts=-1,$postslug,$slug,$template_name='posts_
return Timber::fetch($template_name, $ctx);
}
add_filter( 'timber/twig', function( \Twig_Environment $twig ) {
$twig->addFunction( new Timber\Twig_Function( 'posts_by_service', 'posts_by_service' ) );
/*
add_filter( 'timber/twig', function( \Twig\Environment $twig ) {
$twig->addFunction( new \Twig\TwigFunction( 'posts_by_service', 'posts_by_service' ) );
return $twig;
} );
*/
// fin del templatetag
Timber::render( $templates, $context );
//var_dump($context);
Timber::render($templates, $context );