Keyword

How to display the tags on the tags page

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 7 months ago #110645 by Steven Johnson
How to display the tags on the tags page was created by Steven Johnson
1. I am styling my tags page and I would like to display all the tags for an item on the tags page. Not sure what code to use. Any suggestions?


2. I want to place an <h1> at the top of the page that includes the tag that the page is a listing of. What is the code to print the tag that is being listed on a page?

On the page below I would like to replace the <h1> Online Backup Search with the word 'Press Release' since that is the tag that is being displayed.

Example of Page I am working with:
onlinebackupsearch.com/tag/press-release.html


Thanks! -- Steven

Please Log in or Create an account to join the conversation.

  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
  • Offline
  • Senior Member
More
11 years 7 months ago #110646 by Andrey Miasoedov
Replied by Andrey Miasoedov on topic Re: How to display the tags on the tags page
Hello, Steven.

Unfortunately, it is not possible without K2 core modifications, because item tags block enabled only in specific K2 sections.

You can check it in components\com_k2\models\item.php

Find "//Tags" at line ~106 and condition for generate tags block, you can add " || $task == 'tag'" for enable it at tag page.

Please Log in or Create an account to join the conversation.

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #110647 by Steven Johnson
Replied by Steven Johnson on topic Re: How to display the tags on the tags page
Thanks so much for the reply. Very helpful to know the answer.

I really try to avoid making any core modifications, it makes upgrades much more involved.


Do you think this modification could ever be added into the K2 core?

Are you aware of why the ability to show tags on the tags page was removed?


Thanks! -- Steven

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #110648 by Jan
Hi, can u help me with it? What and where insert it?

My code:
Log in  or Create an account to join the conversation.

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago - 11 years 6 months ago #110649 by Steven Johnson
Replied by Steven Johnson on topic Re: How to display the tags on the tags page
You want to add
Log in  or Create an account to join the conversation.

More
11 years 6 months ago #110650 by Jan
Hi, thx for reply. Okay, what to do now? What to insert in tag.php ?

Please Log in or Create an account to join the conversation.

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 6 months ago #110651 by Steven Johnson
Replied by Steven Johnson on topic Re: How to display the tags on the tags page
in components\com_k2\models\item.php replace lines 106 and 107 with what I posted above and check to see if the tags are now displaying.

You will need to post the code that displays the tags in tags.php

I think this is the code:
Log in  or Create an account to join the conversation.

More
11 years 6 months ago #110652 by Jan
NICE!!! Absolutely thanks a lot!! Thx Jan

Please Log in or Create an account to join the conversation.