x
 
Create New Page

Revision: Conditional Based On Category

Revision from: 21:54, 18 Aug 2006

On a multi-entry page inside the exp:weblog:entries tag, if you want to show information conditionally based on category, you’ll need to use PHP:

{exp:weblog:entries weblog="yourweblog"}

...


{categories}


<?php
if ({category_id} == 54) {
?>

conditional content here

<?php
}
?>
{
/categories}


{
/exp:weblog:entries}

Thread

Category:Entries Category:Templates Category:Categories