Forums/How Do I ... ?

Is there a way to test Config Settings values?

Cindy
posted this on March 14, 2013, 16:47

I want to display content based on the value of a config setting named "parade_active".  The content would only display if the setting's value is "true".  Is there a way to do this with Webvanta script?

 

Comments

User photo
Michael Slater
Webvanta

Yes, you can do this. It is a little non-intuitive, in that the "if" tag only works in an item context, so you need to have that context, even if there is no item being accessed.

The code for what you want to do is:

<w:kb:item:if condition "{{parade_active}} = true">Content to display if condition is met</w:kb:item:if>

Config settings are automatically available as variables, which is why you use the {{ }} around the config setting name.

March 15, 2013, 08:07
User photo
Cindy

That's great.  Thanks!

March 15, 2013, 08:15