Welcome Guest, Not a member yet? Register   Sign In
if page is equal to home
#14

[eluser]the_unforgiven[/eluser]
[quote author="CroNiX" date="1335378129"]
Code:
if ($this->uri->segment(1) == 'home' OR $this->uri->segment(1) === FALSE)
{
  //display something unique for homepage
}
else
{
  //display regular content
}
[/quote]

Works to a certain extent, but in my main controller called store the index function is the home page like so:
So segment(1) == 'home' doesnt work so what should i do based on what i said.
Code:
$data['title'] = 'Site Title';
$data['h1'] = 'Title';
$data['frontend'] = 'home';
$this->load->view('template', $data);


Messages In This Thread
if page is equal to home - by El Forum - 04-25-2012, 04:13 AM
if page is equal to home - by El Forum - 04-25-2012, 05:51 AM
if page is equal to home - by El Forum - 04-25-2012, 05:57 AM
if page is equal to home - by El Forum - 04-25-2012, 06:11 AM
if page is equal to home - by El Forum - 04-25-2012, 06:13 AM
if page is equal to home - by El Forum - 04-25-2012, 06:23 AM
if page is equal to home - by El Forum - 04-25-2012, 06:26 AM
if page is equal to home - by El Forum - 04-25-2012, 06:29 AM
if page is equal to home - by El Forum - 04-25-2012, 06:30 AM
if page is equal to home - by El Forum - 04-25-2012, 06:34 AM
if page is equal to home - by El Forum - 04-25-2012, 06:41 AM
if page is equal to home - by El Forum - 04-25-2012, 06:46 AM
if page is equal to home - by El Forum - 04-25-2012, 11:22 AM
if page is equal to home - by El Forum - 04-25-2012, 11:39 AM
if page is equal to home - by El Forum - 04-25-2012, 11:45 AM
if page is equal to home - by El Forum - 04-25-2012, 11:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB