- Posts: 4
COMMUNITY FORUM
k2 category id
- MaCo
-
Topic Author
- Offline
- New Member
Less
More
12 years 6 months ago #114656
by MaCo
k2 category id was created by MaCo
hello to everybody.
I need to have in the frontpage of my template a variable with the ID of the category regardless of the type of display.
I tried this, but I have not had the desired results
thanks
M
I need to have in the frontpage of my template a variable with the ID of the category regardless of the type of display.
I tried this, but I have not had the desired results
$K2Itemid = JRequest::getInt('id');
if($K2Itemid){
$db = JFactory::getDBO();
$db->setQuery("SELECT catid FROM #__k2_items WHERE id = ".$K2Itemid );
$K2Catid = $db->loadResult();
}thanks
M
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
12 years 6 months ago - 12 years 6 months ago #114657
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: k2 category id
- MaCo
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 6 months ago #114658
by MaCo
Replied by MaCo on topic Re: k2 category id
ok, I'll try and let you know.
thanks
thanks
Please Log in or Create an account to join the conversation.