I would like to detect a certain category with ID=4 and then apply if/else to add div to display contents.
<?php
if (JRequest::getVar('view')=='categories' && JRequest::getVar('id')==4) { ?>
<?php } ?>
How do I achieve this? I want to show this if the article belongs to category 4 else show another div.
Imagining this two be the different div
<div class="category4">text here</div>
<div class="categoryxxx">text here</div>
Do note that <?php echo $this->item->catid;?>
shows the correct Category ID. I would like to apply if and else statement using catid==9 or something. Just not good at PHP.