Keyword

Getting the category name inside index.php

  • Vassilis Vouvonikos
  • Vassilis Vouvonikos's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60841 by Vassilis Vouvonikos
Getting the category name inside index.php was created by Vassilis Vouvonikos
Hello, I am using K2 for joomla 1.7 and I am developing my own template.
I want to get the category name inside index.php so i can give an appropriate css class to the <body> whenever I am viewing an item or an itemlist. Any suggestions on this?

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

  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
  • Offline
  • Senior Member
More
12 years 9 months ago #60842 by Andrey Miasoedov
Replied by Andrey Miasoedov on topic Re: Getting the category name inside index.php
Hello, Vassilis.

You need first get a catid what you view by JRequest.
Next get category name.

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

  • Vassilis Vouvonikos
  • Vassilis Vouvonikos's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60843 by Vassilis Vouvonikos
Replied by Vassilis Vouvonikos on topic Re: Getting the category name inside index.php
Hello Andrey,

Thanks for the help. I managed to do it for items and single category view, but what if i want to display more than one category? How can I get both categories?

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


Powered by Kunena Forum