Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Tag Results Page

Solved by pamtbaau View solution

Started by Sarah L 8 years ago · 2 replies · 656 views
8 years ago

Hi,

I was wondering if anyone could help with my query. I have a site with the Antimatter theme and whenever you click on a Tag to see other posts that have that tag the page that displays is a bit "empty". And by that I mean it lacks a header or title that shows you are viewing the Tag search results.

Does anyone know how I can tweak my template to put a header/title at the top of the tag result page?

Thanks!
Sarah

8 years ago Solution

@techielass According the docs on theme variables, the uri object is available in Twig.

You could add something like the following to template blog.html.twig somewhere around line 20:

TWIG
{% if uri.param('tag') %}
   <h1>Blogs with tag: {{ uri.param('tag') }}</h1>
{% endif %}
👍 1
8 years ago

I presume you are making the changes in a child theme by using Theme Inheritance?

If not, your changes will be lost when Antimatter gets updated. And that would be a pity wouldn't it....

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago