Exhibit/Conditional content

Exhibit Reference Home &raquo;

Conditional content methods
The expression  is the simplest but most common way to access information in a database. An example from the tutorial:

Co-winners:

If a co-winner exists, the stored information is displayed. If not, the area remains empty. But the  attribute is not very powerful, because it has no "else" attribute.

There are a few ways to approach "else" conditions in Exhibit. Exhibit offers a "switch" element on properties. Here, the div stays empty if Class.offering is 'Currently Offered,' otherwise it displays the .offering status.

Though there doesn't exist an actual  attribute, there is simple if/else logic available, as shown in these two examples (you may or may not need curled braces, depending on where you're using this code).  

There is also the  attribute. An example:

 ResourceOwner: 

Finally, to display more complex content conditionally, dynamic styles can be used to toggle the display of the correct div instead, similar to the technique used in Dynamic URLs.  Your Rating:   Rate this: (insert rating element here)

Note: Perhaps there is a correct way to do this. A snippet of code found in Picker's browse.html:  +final

Note: a useful regular expression to find examples of ex:___-(sub)content: