Nested content doesn't appear in the customisations when nested within a show if area


(Richard Crompton) #1

Hi

 

In my parse file I want to display 2 seperate nested content area that are dependant on whether the user is logged in or not.

Heres the code I've added:

 

<MySource_AREA id_name="login_box" design_area="show_if">     <MySource_SET name="condition" value="logged_in" />
    <MySource_THEN>
        <MySource_AREA id_name="lhs_loggedin" design_area="nest_content" cache="1" />
    </MySource_THEN>                    
    <MySource_ELSE>
        <MySource_AREA id_name="lhs_loggedout" design_area="nest_content" cache="1" />
    </MySource_ELSE>

</MySource_AREA>

 

But when I select the details screen in each of the customisations only login_box appears and not lhs_loggedin or lhs_loggedout

 

Any ideas why?


(Nic Hubbard) #2

You are doing it a bit wrong. You need to first create your nest_content areas outside of the other mysource tags. Then you will use the mysource_print tag to print the nested area where you want it:

 

<MySource_area id_name="lhs_loggedin" design_area="nest_content" print="no">
    <MySource_set name="type_codes" value="page" />
</MySource_area>

<MySource_area id_name=“lhs_loggedout” design_area=“nest_content” print=“no”>
    <MySource_set name=“type_codes” value=“page” />
</MySource_area>

<MySource_AREA id_name=“login_box” design_area=“show_if”>
    <MySource_SET name=“condition” value=“logged_in” />
    <MySource_THEN>
        <MySource_print id_name=“lhs_loggedin” />
    </MySource_THEN>
    <MySource_ELSE>
        <MySource_print id_name=“lhs_loggedout” />
    </MySource_ELSE>
</MySource_AREA>

Make sure to keep print="no" on the nest_content areas since you won't want them printing twice.


(Richard Crompton) #3

Excellent, thanks