php - get the current k2 item ID -
i want current item id k2 , store cookie.
(of course when wrote "the current item" in item view of k2 template.)
how can item id k2?
i tried $this->item->id
seems it's not working.
any ideas?
thanks!
$k2itemid = jrequest::getint('id'); $db = jfactory::getdbo(); $db->setquery("select title #__k2_items id = ".$k2itemid ); $k2catid = $db->loadresult(); echo $k2catid;
Comments
Post a Comment