cannot access custom variables in calendar.twig
-
I have created some custom variables to use in my twig templates as follows:
add_filter( 'ai1ec_theme_args_filter-menu.twig', 'mytheme_filter_menu_args', 10, 2 ); function mytheme_filter_menu_args( $args, $is_admin ) { $args['foo'] = "test" return $args; }
I am able to access foo in all my .twig files except for calendar.twig.
What is the problem?
Nevermind – you need to change the names as follows:
ai1ec_theme_args_filter-menu.twig -> ai1ec_theme_args_calendar.twig
What a mess this plugin is…
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘cannot access custom variables in calendar.twig’ is closed to new replies.