Keyword

Dinamic page browser title

  • pacman
  • pacman's Avatar Topic Author
  • Offline
  • New Member
More
10 years 8 months ago #123730 by pacman
Dinamic page browser title was created by pacman
I would need to have the title of the browser page consists of: Item - CategoryName. I do not want the sitename (see below).
To do this, I should make a madifica to index.p template assembling these 2 changes in a single code.
But I'm not very practical.

1.
<? php
$ app = JFactory :: getApplication ();
$ this-> setTitle ($ this-> getTitle (). '-'. $ app-> getcfg ('sitename'));
?>

2.
<? php
$ K2Itemid = JRequest :: getInt ('id');
if ($ K2Itemid)
{
$ db = JFactory :: getDBO ();
$ db-> setQuery ("SELECT catid FROM # __k2_items WHERE id =". $ K2Itemid);
$ K2Catid = $ db-> loadResult ();
}
?>

Help me please?
Thank you. -

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


Powered by Kunena Forum