Created
June 22, 2015 12:35
-
-
Save steve10287/5f88fdceab3e5bccc89a to your computer and use it in GitHub Desktop.
Joomla 3 get category
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get category id | |
$input=$app->input; | |
if ($input->getCmd('option')=='com_content' | |
&& $input->getCmd('view')=='article' ){ | |
$cmodel = JModelLegacy::getInstance('Article', 'ContentModel'); | |
$catid = $cmodel->getItem($app->input->get('id'))->catid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment