Quantcast
Viewing all articles
Browse latest Browse all 2233

phpBB Custom Coding • Re: [SOLVED] Does anyone understand Twig macros?

By the way, if you are going to use an include, couldn't you just do the syntax like this?
You can also provide a list of templates that are checked for existence before inclusion. The first template that exists will be included:

{% include ['page_detailed.html.twig', 'page.html.twig'] %}

From: https://twig.symfony.com/doc/3.x/tags/include.html
So just use:

Code:

{% include ['language/' ~ S_USER_LANG ~ '/style_strings.twig', 'language/en-gb/style_strings.twig'] %}
Any reason why that wouldn't work just as well?

Statistics: Posted by Gumboots — Sat Apr 12, 2025 11:09 am



Viewing all articles
Browse latest Browse all 2233

Trending Articles