Gossamer Forum
Home : Products : Others : Gossamer Community :

help with elseif condition

Quote Reply
help with elseif condition
I'm trying to write a elseif condition for my user home page in community that would instruct a user to add content to edit their profile to add content to the page if they have nothing selcted. (Usually this would be for new users. I already have the conditions set for each content item but I can't figure out how to test to see if there is no content selected and then output the instruction on how to edit profiel.
I have something like this
Code:

<%if prof_item eq "1">
<%include content.html%>
<%end if%><%if prof_item2 eq "1">
<%include content2.html%>
<%end if%><%if prof_item3 eq "1">
<%include content3.html%>
<%end if%>I want to put instructions here if all the prof_items are set to 0I'm sure I'm just missing something simple but I'd appreciate the pointerThanks in advanceCCUnet
my Christian web
Quote Reply
Re: [ccunet] help with elseif condition In reply to
Code:
<%if prof_item eq "1">
<%include content.html%>
<%elsif prof_item2 eq "1">
<%include content2.html%>
<%elsif prof_item3 eq "1">
<%include content3.html%>
<%else%>
... show other stuff here
<%endif%>

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] help with elseif condition In reply to
I ended up doing this to get it to work

Code:

<%if prof_item eq "0" and prof_item2 eq "0" and prof_item3 eq "0"%>
... show other stuff here
<%else%>
<%if prof_item eq "1">
<%include content.html%>
<%elsif prof_item2 eq "1">
<%include content2.html%>
<%elsif prof_item3 eq "1">
<%include content3.html%>
<%endif%>
<%endif%>
my Christian web