danzo
danzo

Reputation: 301

Joomla 1.5 - Show image based on category ID

I'm trying to set up a blog page on an old Joomla 1.5 site. I need a different header graphic to show based on which of 3 categories is the current category.

This is what I have thus far, which doesn't really work. For the sake of this example, we'll just use an echo statement in place of the graphic.

if ($this->catid = "960") {
    echo "this is category number 960";
}
else {
    echo "This is another category";
}

?>

Does anyone remember how to do this in Joomla 1.5?

Upvotes: 0

Views: 121

Answers (1)

danzo
danzo

Reputation: 301

Figured it out...

<?php $catNum = JRequest::getVar('id'); 

if ($catNum == "962"){
    echo "Category Number 962";
}
else{
    echo "nope";
}


?>

Upvotes: 1

Related Questions