We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Where can I find a list of global template variables? | Forum

Jason
Jason Apr 25 '15
I know about 

{$siteUrl}

and 1 or two others but I cant find a list that shows more. 


Mostly I need one to detect guests


If guest

 this

else

this

end if

dave Leader
dave Apr 25 '15

if (!OW::getUser()->isAuthenticated() )

{

//they are a guest and not signed in so take them to home page

$this->redirect(OW_URL_HOME);

}


Jason
Jason Apr 25 '15
hi dave Thank goodness you're here.. I am doing this in an html file. 

ow_system_plugins/base/views/components/console.html but it doesn't work


I have a <div> that I am trying to show to members.  Any ideas?

Thanks so much in advance!!

 <?php if ( OW::getUser()->isAuthenticated() ) ?>

<div>my html stuff </div>

<?php endif; ?>


I am doing this in ? How can I detect if someone is logged in?

dave Leader
dave Apr 25 '15
see my post here 


http://www.oxwall.org/forum/topic/7725

dave Leader
dave Apr 25 '15
in your case your php file would be 


ow_system_plugins/base/controllers/console.php

Jason
Jason Apr 26 '15
I had to hard code my html into the console.php file since inline php placed in the html file doesn't seem to work. I couldn't even <?php echo 'this text'; ?> 

not sure why not. 

Thanks

Jason
Jason Apr 26 '15
oh I see, I need template logic. 

I will leave this here for posterity so other noobs can benefit. 

{if ($label == "Messages") }TEST{/if}