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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Tag Results Page

Solved by pamtbaau View solution

Started by Sarah L 8 years ago · 2 replies · 397 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 Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 14 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago