• Resolved dietcheese

    (@dietcheese)


    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…

    • This topic was modified 7 years, 7 months ago by dietcheese.
Viewing 1 replies (of 1 total)
  • @dietcheese, The availability of the twig files are a courtesy as they are in development stage, hence there is limited documentation officially released, but thanks for the suggestion.

Viewing 1 replies (of 1 total)
  • The topic ‘cannot access custom variables in calendar.twig’ is closed to new replies.