Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Reuse Text
· 9 years ago
A possible way is to store your strings in a user/config/strings.yaml file STRING_1: "A string" STRING_2: "Another string" and then use {{config.strings.STRING_1|t}} inside your pages. With Twig proc
-
Reuse Text
· 9 years ago
Hi, I'm a technical writer and looking for a simple solution for some software documentation projects. For my purpose markdown syntax and structure of the Grav server suits very well, because software
-
findTaxonomy() doesn't find pages
· 9 years ago
Okay, thank you for your answers! I used the Twig tag above incorrectly, {% do var_dump() %}did print out something. The for loop works indeed. I just hoped to create a concise macro using PHP array m
-
findTaxonomy() doesn't find pages
· 9 years ago
@stanislav's code should work. I just confirmed by testing with my own taxonomy type 'tag' and it performed as expected. I would try with the cache turned off as it could be related to that.
-
findTaxonomy() doesn't find pages
· 9 years ago
May be so: {% for page in taxonomy.findTaxonomy({'series': 'lp'}) %} {{ page.title }} {% endfor%} ---
-
findTaxonomy() doesn't find pages
· 9 years ago
Hello, in a project I'm trying to get the index of the current page in the collection of all pages with the taxonomy {'series': 'lp'}, ordered by date. But I can't even get to that collection of pages
-
How to best override system metadata in twig templates for specific page types?
· 9 years ago
Just a followup- this worked out beautifully. Thanks again
-
How to best override system metadata in twig templates for specific page types?
· 9 years ago
Hey flaviocopes. Thanks for the response- this seems pretty straightforward especially since I see how the embed blocks work versus the extended ones now from taking a look at the twig documentation.
-
How to best override system metadata in twig templates for specific page types?
· 9 years ago
So, {% block twig %} {% include 'partials/metadata.html.twig' %} {% endblock %} and in your page twig: {% block twig %} {# just my metadata #} {% endblock %}
-
How to best override system metadata in twig templates for specific page types?
· 9 years ago
You can put the metadata twig in a block, and then override the block in the specific Twig. Just like what happens with the content block