Zen Cart Logo
Forums / Contribution-Writing Guidelines / Is there a way to override the pages header.php file...

Is there a way to override the pages header.php file...

Views: 3,885

Results 1 to 4 of 4
15 Apr 2011, 6:08 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Is there a way to override the pages header.php file...

What I would like to know is there a way to override the pages directory for a template so that I don't have to modify the pages/xxxxx/header.php file directly?

If so where can I place my file?

15 Apr 2011, 7:07 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Is there a way to override the pages header.php file...

No.
You'll need to rename the existing header_php.php file as header_php.ORIGINAL and then put your custom version of the file in that same folder as header_php.php.

10 Jun 2011, 5:11 PM
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Is there a way to override the pages header.php file...

If another file is placed in a pages /modules/pages directory, in what order will it be loaded?

In general, I'm trying to write a redirect code for the login page but want the page to either redirect to account creation OR account guest checkout (via module).

10 Jun 2011, 7:14 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Is there a way to override the pages header.php file...

Multiple header_php files will be loaded in the order in which the filesystem lists them back to PHP. There is no explicit sort done on them.

Better to use a notifier/observer to hook the notifier point already found in the top of that file, and let the observer do the required redirect instead.