Post by virtualgeorge » Fri Nov 20, 2009 11:31 pm

I want to use a unique header on just the home page.

I am using 1.3.4

So on home.tpl I changed the very first line from
<?php echo $header; ?>
to
<?php echo $header2; ?>

Now what is needed so I can use $header2; ?

I saved a copy of template/common/header.tpl as
template/common/header2.tpl

I saved a copy of controller/common/header.php as
controller/common/header2.php

Don't want to change the language or any of the displayed text so didn't think this was necessary but did it anyways and saved a copy of language/english/common/header.php as
language/english/common/header2.php

When I load the page I get an error:
Notice: Undefined variable: header2

Is there much else needed?

thanks!

Active Member

Posts

Joined
Wed Jun 18, 2008 5:57 am

Post by thanaa » Mon Nov 23, 2009 6:43 am

the header variable is set in the controller, so either modify your controller or simply copy and paste the header.tpl code into your home.tpl and dont include a header file at all. then modify to suit your needs.

New member

Posts

Joined
Tue May 05, 2009 2:12 am

Post by broadsighted » Thu Feb 10, 2011 8:45 am

I tried the exact same thing before finding this post.

Obviously I couldn't get it to work either. :)

Anyone know where the header variable is defined?

Image


Newbie

Posts

Joined
Tue Nov 30, 2010 4:27 am
Location - Denver, CO

Post by broadsighted » Thu Feb 10, 2011 8:53 am

(Thanaa's suggestion throws a bunch of errors.)

Image


Newbie

Posts

Joined
Tue Nov 30, 2010 4:27 am
Location - Denver, CO
Who is online

Users browsing this forum: No registered users and 6 guests