Friday 24 June 2005 11:32:03 am
Hi, if you want to keep your existing code try this:
{let subNav='yes'}
{switch match=$module_result.section_id}
{case match=1}
{set subNav='no'}
{/case}
{case match=2}
{set subNav='yes'}
{/case}
{case}
{* This is the case if nothing is in $module_result.section_id - or the sectionID was not mentioned above... *}
{/case}
{/switch}
{section show=$subNav|eq('yes') }
*some html etc.*
{section-else}
*some html etc.*
{/section}
{/let}
Personaly I prefer boolean instead of 'yes' and 'no'. But this will work too... To do that with boolean values, try that:
{let subNav=true()}
{switch match=$module_result.section_id}
{case match=1}
{set subNav=false()}
{/case}
{case match=2}
{set subNav=true()}
{/case}
{case}
{* This is the case if nothing is in $module_result.section_id - or the sectionID was not mentioned above... *}
{/case}
{/switch}
{section show=$subNav }
*some html etc.*
{section-else}
*some html etc.*
{/section}
{/let}
Refer to this docs:
-http://ez.no/ez_publish/documentation/development/libraries/ez_template/functions/switch -http://ez.no/ez_publish/documentation/customization/custom_design/template_variables_set_by_ezpublish
Hope this helps... ...and have a nice weekend with trying it ;)
Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________
|