Keyword

Adding category name to 'Related tags' on item page

  • Case Noland
  • Case Noland's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #83821 by Case Noland
Hey guys, I am updating my item.php under the <!-- Related items by tag --> section to include the corresponding category name after the link to the related item.My question is, what is the php variable for category name?I am able to use:$item->catidbut$item->category$item->category->nameetc... aren't rightDoes anyone know the right string to pull the category name?

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

  • Case Noland
  • Case Noland's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #83822 by Case Noland
Replied by Case Noland on topic Adding category name to 'Related tags' on item page
After looking deeper into the "jos_k2_items" table in the DB it just doesn't look like there is a text field for category name. The closest there is category ID (catid). How else would you recommend I retreive the category name?

will pull the current category name, but I want the category name for the corresponding tag being pulled, and doesn't work.

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

  • Case Noland
  • Case Noland's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 11 months ago #83823 by Case Noland
Replied by Case Noland on topic Adding category name to 'Related tags' on item page
Found what I thought (if anything) would be what I was looking for within:

/modules/mod_k2_content_tag/tmpl/default/default.php

Around line 117 it is doing exactly what I want to do, namely calling and linking to the category of a tag.
I used the same "$item->categoryname" but it still IS NOT WORKING??

Confused and appreciate the help.
Case

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


Powered by Kunena Forum