Moderators Kyle Posted July 14, 2010 Moderators Report Posted July 14, 2010 Ok, i'm trying to make a add on and i am making it only accessable for pilots but when i was logged in, i all got the red bar and my .Tpl is in the templates folder. What is wrong with this code? <?php class flightops extends CodonModule { public function index() { if(!Auth::LoggedIn()) $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; Template::Show('flightops.tpl'); } } ?> Any help would be awsome Quote
Guest lorathon Posted July 14, 2010 Report Posted July 14, 2010 Try this You need to put what you want done if the IF is true in brackets since it is more than one command. <?php class flightops extends CodonModule { public function index() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } Template::Show('flightops.tpl'); } } ?> Quote
Moderators Kyle Posted July 14, 2010 Author Moderators Report Posted July 14, 2010 It worked, thanks so much! I'm just making a flight ops page with alot of features. Thanks for help! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.