DESIGN nesting menu_normal within show_if


(paul walker) #1

Hi Folks - It’s me again

Why would Example A (below) display a menu correctly but Example B not? The “Menu” heading DOES show in example B indicating the conditional statement is working

Example A;

Menu
<MySource_AREA id_name=“menu” design_area=“menu_normal”>
<MySource_SET name=“level” value=“children” />
<MySource_ASSET>
<MySource_PRINT var=“asset_name_linked” />
</MySource_ASSET>
<MySource_DIVIDER></MySource_DIVIDER>
</MySource_AREA>

Example B:

<MySource_AREA id_name=“left_panel” design_area=“show_if”>
<MySource_SET name=“condition” value=“keyword_regexp”/>
<MySource_SET name=“condition_keyword” value=“asset_metadata_left-col”/>
<MySource_SET name=“condition_keyword_match” value=“yes” />
<MySource_THEN>
Menu
<MySource_AREA id_name=“menu” design_area=“menu_normal”>
<MySource_SET name=“level” value=“children” />
<MySource_ASSET>
<MySource_PRINT var=“asset_name_linked” />
</MySource_ASSET>
<MySource_DIVIDER></MySource_DIVIDER>
</MySource_AREA>
</MySource_THEN>
</MySource_AREA>

Thanks in anticipation
Paul


(paul walker) #2

Think I may have sussed this out (if anyone interested) by looking at other examples. The idea appears to be to establish the menu first (with print=“no”) then, within the show_if section print the menu with <MySource_PRINT id_name=‘left_nav’ />. See example below

<MySource_AREA id_name=“left_menu” design_area=“menu_normal” print=“no”>
<MySource_SET name=“level” value=“children” />
<MySource_ASSET>
<MySource_PRINT var=“asset_name_linked” />
</MySource_ASSET>
<MySource_DIVIDER></MySource_DIVIDER>
</MySource_AREA>
</MySource_THEN>
</MySource_AREA>

<MySource_AREA id_name=“left_panel” design_area=“show_if”>
<MySource_SET name=“condition” value=“keyword_regexp”/>
<MySource_SET name=“condition_keyword” value=“asset_metadata_left-col”/>
<MySource_SET name=“condition_keyword_match” value=“yes” />
<MySource_THEN>

<MySource_PRINT id_name=‘left_nav’ />

</MySource_THEN>
</MySource_AREA>

BOOM