Empire CMS: Branching Template Output on a Field's Value

Empire CMS

I've been building with Empire CMS lately, and sometimes a template needs to output different content depending on what a field holds.

<?php
$shFieldname=$navinfor[Fieldname];
if ($shFieldname=="A") {
?>
code for value A
<?php
}elseif ($shFieldname=="B") {
?>
code for value B
<?php
}else{
?>
default code
<?php
}
?>

Leave a Comment

Comments No Comments

Table of Contents