Customising site appearance and functionality for different users


(Ryan Archer) #21

Thanks Nic, I did end up getting that working, a bit confusing to grasp initially but its working out now.

 

<!-- Inserting nested content design area for use within IF_ELSE design area, turned off here and turned on within show_if statement if condition is met -->
<MySource_AREA id_name="ikc_panel" design_area="nest_content" print="no" />
<MySource_AREA id_name="rlq_panel" design_area="nest_content" print="no" />
<MySource_AREA id_name="random_nested_content" design_area="nest_content" />

<!-- Inserting a header which changes it’s style and content depending on the assigned user group (through use of a cookie -->
<div style = “padding: 20px; background: #ccc; border: 4px solid #333”>
<MySource_AREA id_name=“in_group_ikc” design_area=“show_if” print=“no”>
    <MySource_SET name=“condition” value=“in_user_group” />
        <MySource_THEN><MySource_print id_name=“ikc_panel” /></MySource_THEN>
        <MySource_ELSE>Not in IKC Group</MySource_ELSE>
</MySource_AREA>

<MySource_AREA id_name=“in_group_rlq” design_area=“show_if”>
    <MySource_SET name=“condition” value=“in_user_group” />
        <MySource_THEN><MySource_print id_name=“rlq_panel” /></MySource_THEN>
        <MySource_ELSE><MySource_print id_name=“in_group_ikc” /></MySource_ELSE>
</MySource_AREA>
</div>

That is great for having two user groups, but how can I take this model further to include a 3rd user group? I have tried this with playing with the code but it is not being friendly - it seems to be like a boolean on/off switch and I can't seem to have a third value in there. Man I would so love if it could have an ELSE IF functionality built in like the majority of OOP out there...

 

Please see my question in http://forums.squizsuite.net/index.php?showtopic=11939(last post).