Welcome Guest, Not a member yet? Register   Sign In
Wanted to verify syntax.
#2

[eluser]PhilTem[/eluser]
Your syntax should be right (maybe you need to remove the leading / at '/homepage' though, I'm not quite sure).

However, I'd recommend using

Code:
<?php if ( $this->uri->rsegment(1) == 'homepage' && $intranetContest == 'on' ) : ?>

since it's easier readable, faster written and less error prone.

This will work if and only if we're assuming that 'homepage' is your default_controller as set in config/routes.php and all requests to that page aren't routed any further. The 'r' in front of 'segment' is wanted to use the routed segments, otherwise, if there was no URI given, 'segment(1)' would return an empty string while 'rsegment(1)' returns 'homepage'.


Messages In This Thread
Wanted to verify syntax. - by El Forum - 06-08-2012, 06:37 AM
Wanted to verify syntax. - by El Forum - 06-08-2012, 07:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB