Created
June 18, 2017 10:56
-
-
Save qwersk/94f400c237955de0294cf35c68a6bb7e to your computer and use it in GitHub Desktop.
GET CATEGORY ID #JOOMLA
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
| $app = Jfactory::getApplication(); | |
| $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; | |
| echo $catid; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment