Table of Contents

Core Default Tag

CORE:DEFAULT

Provide a default action to take place at runtime, should a value which is expected to exist in the runtime Data Source have failed to have been populated. For example:

Syntax

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

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:optional> tag for simple if/else logic.

Examples

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