开发者

How can I get current category id of Virtue Mart

I want to cha开发者_如何学Pythonnge the default Featured Products module of Virtue Mart. I would like to this module show just the current category's featured product. So I need to get the current category id.

How can I get it?

Thanks!


JRequest::getInt(category_id);


$input = JFactory::getApplication()->input;

// should be article, categories, featured, blog...

$view = $input->get('view'); 

// if it's a category view, this will be the category id, else the article id

$id = $input->getInt('id'); 

// in an article view, this will be the cat id.

$catid = $input->getInt('catid'); 

// this is the menu item id i.e. what you call page id I guess.

$Itemid = $input->getInt('Itemid'); 

I hope this will help you.. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜