Zen Cart Logo
Forums / Contribution-Writing Guidelines / Questions about the way a new 'page' is created

Questions about the way a new 'page' is created

Locked

Views: 2,236

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 Sep 2007, 5:30 AM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Questions about the way a new 'page' is created

Say if I want to create a page which can be accessed at main_page=test, I have to create a folder named 'test' located in includes/modules/pages

This folder doesn't even have to content anything, it's just there to simply 'hold' the place. Is there anyway to avoid this?

Second question: say if I have several php files in there, are they gonna be loaded automatically?

Thank you.

21 Sep 2007, 6:33 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Questions about the way a new 'page' is created

If you do not have such a folder, the page is deemed to not exist, and will trigger the built-in page-not-found redirects.

Any files in that folder matching the regex defined by: '/^header_php/' ... will be auto-loaded.

21 Sep 2007, 10:55 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,694
Plugin Contributions:
56

Re: Questions about the way a new 'page' is created

yellow1912:

This folder doesn't even have to content anything, it's just there to simply 'hold' the place. Is there anyway to avoid this?

Even if there's no logic in your header.php (which would be odd) you would still want to load your languages files there.

Scott