Recent changes RSS feed
 

Core Optional Tag

CORE:OPTIONAL

Show template content at runtime when a value in the runtime Data Source has been populated. For example:

Syntax

 
  <core:optional for="IsLoggedIn">
    <p><a href='logout.php'>log out</a></p>
  </core:optional>
  
  <core:default for="IsLoggedIn">
    <p><a href='login.php'>log in</a></p>
  </core:default>

Description

The for attribute is used to identify the name of the variable in the dataspace.

This tag is often used in conjunction with the <core:default> tag for simple if/else logic.

Examples

Please have a look at the examples section to see this tag in action.

 
tag/core/optional.txt · Last modified: 2006/12/09 17:16
 
Hosting for this site donated by Procata PHP Development