Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to determine what page is being displayed?

How to determine what page is being displayed?

Locked

Views: 714

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
15 Jan 2010, 9:38 PM
#1
ryanf avatar

ryanf

New Zenner

Join Date:
Mar 2007
Posts:
32
Plugin Contributions:
0

How to determine what page is being displayed?

Hello, I've got some code thats going into the footer template but I would only like it do display on certain pages. is there a easy way to do this?

For example in Wordpress there are the functions is_home or is_page('some-page') where I can use if statements to surround the code to display it only on those pages.

Anything like this in Zen Cart or a work around?

Thanks
Ryan

15 Jan 2010, 9:51 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to determine what page is being displayed?

What is easier?
Pages where you do not want it?
Or pages where you do?

15 Jan 2010, 9:53 PM
#3
ryanf avatar

ryanf

New Zenner

Join Date:
Mar 2007
Posts:
32
Plugin Contributions:
0

Re: How to determine what page is being displayed?

Pages where I do want it would be easier.

15 Jan 2010, 10:21 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to determine what page is being displayed?

Acustom tpl_main_page.php can handle this
Open it ans see the many comments
Might list the pages where you want it here

15 Jan 2010, 10:24 PM
#5
ryanf avatar

ryanf

New Zenner

Join Date:
Mar 2007
Posts:
32
Plugin Contributions:
0

Re: How to determine what page is being displayed?

thanks, I see the $current_page_base, I'll try using that as the check.