{guest}
Renders its content when nobody is logged in, and its else half for a user.
Syntax
{guest} ... {/guest}
{guest} ... {else} ... {/guest}
Description
{guest} renders its content when nobody is logged in to this application, and the part after its own {else} - or the @else@ half - when someone is. It is {auth} turned round, without the user's row: the fields of the user are {auth}'s to give.
Like {auth} it never starts a session to find out: a visitor without a session cookie is a guest at once. The pair must close - a lone {guest} is an error under the strict check.
Examples
Only for a guest
Nobody is logged in here, so the content renders; for a user the else half would.
{guest}
<p><a href="#register">Create an account</a> or <a href="#login">log in</a>.</p>
{else}
<p><a href="#logout">Log out</a></p>
{/guest}
A header for both
{guest} and {auth} side by side: {guest} hands over no data, {auth} hands over the user's row.
<header>
{guest}<a href="?login">Log in</a>{/guest}
{auth}<span>{$name}</span> <a href="?logout">Log out</a>{/auth}
</header>