Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Tag Results Page

Solved by pamtbaau View solution

Started by Sarah L 8 years ago · 2 replies · 538 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 jeremycherfas, 1 week ago
4 182 2 days ago
General · by lynbor, 6 days ago
2 124 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 2 weeks ago
1 124 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago