If this is your first visit, check our documentation. To post, register or login.
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...

Started by retched on 15 Apr 2011, 6:08 PM · Views: 3,899

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,512
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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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,512
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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.