Show use of conditional expressions with multiple terms.

Source code

show_menu2(0, SM2_ROOT, SM2_ALL, SM2_TRIM|SM2_PRETTY,
'<li class="[class]">'.
'[if( id == current || class == menu-expand ){ <b>}][if(id==current){ <i>}]'.
'[if( id == current || class == menu-expand ){ </b>}][if(id==current){ </i>}]'

Example results


This is an example of conditional output only. This same result is better obtained (fast, efficient) using CSS to style the menu with the pre-existing classes.

    .menu-current { font-weight: bold; font-style: italic; }
    .menu-expand { font-weight: bold; }
Powered by Website Baker