Vivvo CMS Support Forum Home | Free Trial | Online Demo | Docs and Manuals | Order Now   

Go Back   Vivvo CMS Support Forums > Vivvo 4 > Troubleshooting

Troubleshooting Problems, need help? Have a tip or advice? Post it here.

Reply
 
Thread Tools Display Modes
Old 12-07-2011, 09:54 PM   #1
noncasus
Senior Vivvo User
 
Join Date: Dec 2008
Posts: 422
Rep Power: 5
noncasus is on a distinguished road
Default IF statement question

I'm having a problem where I need to force the amount of loops the box article list module can make depending on the category.

I have 6 categories I need to check and see and instead of those categories having the variable "{VIVVO_MODULES_MORE_NEWS_ARTICLE_NUMBER}" I'm using the loop attribute in the foreach.

Now I can get this working with a simple if statement but only for one category.

My question is, how do I get it to work for several? I noticed there is no OR clause in the if statement.

Here are some examples of how I'm going about this:

This one is for an array (which seems to not work but I feel like I'm close)
Code:
<vte:if test="{'30','33','22','19','16','17'} in {category.id}">
...do your thing...
</vte:if>

This one is the one that works for a single category:
Code:
<vte:if test="'30' in {category.id}">
...do your thing...
</vte:if>
noncasus is offline   Reply With Quote
Old 12-08-2011, 08:08 PM   #2
bobster65
Vivvo Veteran
 
Join Date: Aug 2008
Location: Big Sky Country
Posts: 579
Rep Power: 5
bobster65 is on a distinguished road
Default

Try this. All the Id's need to be comma seperated within the array, so just one set of ' marks is needed.

Code:
<vte:if test="{category.id} in '30,33,22,19,16,17' ">
...do your thing...
</vte:if>
bobster65 is offline   Reply With Quote
Old 12-08-2011, 11:28 PM   #3
noncasus
Senior Vivvo User
 
Join Date: Dec 2008
Posts: 422
Rep Power: 5
noncasus is on a distinguished road
Default

bobster, I don't know how you do it, but you saved another person today. Thanks!
noncasus is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Order now:

Order your copy of Vivvo now and get:
bullet Six months free upgrades
bullet Free support
bullet Full source code
bullet Immediate download
bullet Starting at only $295.00
Order now

Support HelpDesk:

You can submit a trouble ticket in the support area at any time, using your client area email and password.

Vivvo CMS Resource Center:

The Vivvo CMS Resource Center is your window to a variety of resources that showcase Vivvo's features and technologies. So whether you're brand new to Vivvo or a seasoned user, you can find the information you need right here!

Latest Additions:

Contact us:

Business hours
Mon-Fri 9:00AM - 6:00PM GMT+1
(Europe)
Telephone Sales
381 11 311-50-20
Email inquiries
sales@vivvo.net
(Sales inquiries)
support@vivvo.net
(Support inquiries)

All times are GMT +1. The time now is 12:18 PM.
Contact Us - Vivvo Home - Archive - Privacy Statement - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.