Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

how to make final if/then statement just a comment and not output?


Reply


636 Views

Avatar
Hello_electro

Community Member, 80 Posts

30 March 2011 at 8:52am

If I am using the DOM and lets say I have two categories for $food (meats and cheese) that i can choose with each food item i pick.

I want to create something like this:

<% control TypesofFood %>
<% if category == meat %>
$food
<% else_if category == cheese %>
$food
<% else %>
You aint got no meat or cheese!
<% end_if %>
<% end_control %>

my problem that if SS makes it all the way through the argument and gets to "You aint got no meat or cheese!" it will repeat this for as many times as their are Dataobjects.

Anyone know how I get that last statement to just appear once?? Thanks!