Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Tag Results Page

Solved by pamtbaau View solution

Started by Sarah L 8 years ago · 2 replies · 481 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 jean-louis67, 3 days ago
2 81 2 days ago
General · by Andy Miller, 7 days ago
0 146 7 days ago
General · by Veehem, 1 week ago
0 146 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago