how to show inside template with glue?

39 views
Skip to first unread message

webpied

unread,
Oct 24, 2011, 5:11:14 PM10/24/11
to GluePHP
anyone know how i would handle hide/show with glue+ smarty? (so the
login shows when you're logged out - and vice versa)
for some reason it is like it does nto see the code at all inside
smarty.

if(!$_SESSION['LoggedIn']){ ?>
<li id=""><a href="/signin/" title="Galson Labs Portal
Login"><span></span>Portal Login</a></li>
<?php } else { ?>
<li id=""><a href="/logout/" title="Galson Labs Portal
Logout"><span></span>Sign Off</a></li>
<?php } ?>

php<3

unread,
Nov 7, 2011, 9:58:22 AM11/7/11
to GluePHP
is glue dead? doesn't seem to be much activity in here.
not sure it's 'the way' to do this, but in case someone else needs it
down the road:
i set a class property for $this->logged_in and just use this in the
template (passing in the value of class::logged_in() to smarty:

{if $logged_in}
<li><a href="/logout/">Logout</a></li>
{else}
<li><a href="/signin/">Sign In</a></li>
{/if}
Reply all
Reply to author
Forward
0 new messages