Keyword

Need code snippet to get top lev k2 category title

  • Tracey
  • Tracey's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 3 months ago #129666 by Tracey
Hi all,

I searched the forum and google but couldn't find an answer for this except for one post asking the same question. They were able to figure it out but didn't say how.

What I need is a php code snippet that I can use in the k2 tools custom box that will get the the current top level category title for that page.

For example, I have a category called Conservation Commision and inside that I have several other categories. No matter which page I am on if the Conservation Commission is its top level category I want to show the title "Conservation Commission". I am trying to do this with k2 tools module and would like to set it to all pages so that it will always return the top level category name no matter which sub category I'm in.

Hope this makes sense and someone can help.

Thanks

Joomla! v3.5.1
Gantry5 - Hydrogen Template
k2 v2.7.0

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


Powered by Kunena Forum