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. -
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. -