"show if design area" with "nest content"

I wanted to achieve this in designs:


IF logged_in THEN

SHOW content of asset 1234

ELSE

SHOW content of asset 5678



So i prepared something like this:



<MySource_AREA id_name="aaa" design_area="show_if">

<MySource_SET name="condition" value="logged_in" />

<MySource_THEN>



<MySource_AREA id_name="nest_logged" design_area="nest_content">

<MySource_SET name="type_codes" value="page" />

</MySource_AREA>



</MySource_THEN>

<MySource_ELSE>



<MySource_AREA id_name="nest_unlogged" design_area="nest_content">

<MySource_SET name="type_codes" value="page" />

</MySource_AREA>



</MySource_ELSE>

</MySource_AREA>



But in details of design I can only customize "aaa" & cannot customize "nest_logged", "nest_unlogged".

Am I missing something? Can You help me to do it in a right way?

Another option is to have two paint layouts and apply them on a customisation.


One that displays the asset contents only if logged in,

Another that displays the asset contens only if not logged in.



Then set these paint layouts as arbitary paint layouts on the two nested content divs (respectfully) in your customisation.

[quote]
Another option is to have two paint layouts and apply them on a customisation.



One that displays the asset contents only if logged in,

Another that displays the asset contens only if not logged in.



Then set these paint layouts as arbitary paint layouts on the two nested content divs (respectfully) in your customisation.

[/quote]

Thanks aleks. I want to use Design in this case - not Paint Layouts.

I still don't know how to achieve this :frowning:

I don't think you can have a MySource_AREA inside a MySource_AREA unfortunately.

Best way would be to put the nest content area outside of the show if and set them to print=no and then use the print tag for the area in the show if statement.

[quote]
Best way would be to put the nest content area outside of the show if and set them to print=no and then use the print tag for the area in the show if statement.

[/quote]

That's the ticket!

Yes, you need to do something like the following:

    
    // Nest code, but we don't print it here
    
      
    
    
    
    // Show if code
    
      
       
      	// Print our nested content here if user is logged in
    
      
      
    

[quote]
Yes, you need to do something like the following:

[…]

[/quote]



Works! Thank You all for help! :slight_smile: