Forums / General Questions / $this_is_home_page

$this_is_home_page

Views: 3,264

Results 1 to 12 of 12
5 Dec 2009, 10:14 PM
#1
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

$this_is_home_page

Hi does anyone know how this is defined and is it possible to have the function for other pages of your chosing. For example is it possbile to have a $this_is_page_5678 or whatever and have the $this_is_home_page functions for it by defining it somewhere?

5 Dec 2009, 10:47 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: $this_is_home_page

$this_is_home_page is a variable set specifically to determine when you are on the "Home Page" of your site based on various configuration settings ...

You can test for any condition you want for other things, but it would help to have an idea of what it is you are trying to do as there are 1000s and 1000s of conditions that can be tested for ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Dec 2009, 12:04 AM
#3
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

Re: $this_is_home_page

Well for example I have a delivery info ezpage. I have a sidebox with an image linking to it. Currently when it is clicked on the sidebox remains when the page displays. I would like the $this_is_home_page functions to be able to hide the sidebox when it is on the ezpage if it's possible.

6 Dec 2009, 12:33 AM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: $this_is_home_page

timdwyer42:

Well for example I have a delivery info ezpage. I have a sidebox with an image linking to it. Currently when it is clicked on the sidebox remains when the page displays. I would like the $this_is_home_page functions to be able to hide the sidebox when it is on the ezpage if it's possible.

if (in_array($ezpage_id,explode(",",'2,5'))) {

showsidebox = false;

}

The highlighted portion would be the ez-pages you wish to hide the sidebox on

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

7 Jan 2010, 5:43 AM
#5
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: $this_is_home_page

How would you check to see if you were on a specific category? for example;
if this is page categoryId 65
then show image65.gif

7 Jan 2010, 6:21 AM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: $this_is_home_page

jamielife:

How would you check to see if you were on a specific category? for example;
if this is page categoryId 65
then show image65.gif

if (in_array($cPath,explode(",",'65')) ) {

}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

19 Jan 2011, 6:08 PM
#7
kaylee_girl avatar

kaylee_girl

New Zenner

Join Date:
Jun 2008
Posts:
22
Plugin Contributions:
0

Re: $this_is_home_page

hmm...what about for an individual product page (as opposed to a category page or the home page.) Is there a list of these anywhere? I need a few...

thanks for your help!

19 Jan 2011, 6:27 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: $this_is_home_page

if ($current_page_base == 'product_info' and (in_array($_GET['id'],explode(",",'234,789'))) ) {

//execute on product 234's or product 789's info page

}

19 Jan 2011, 7:32 PM
#9
kaylee_girl avatar

kaylee_girl

New Zenner

Join Date:
Jun 2008
Posts:
22
Plugin Contributions:
0

Re: $this_is_home_page

What if I want it to show up on all individual product pages? Not just a specific page?

19 Jan 2011, 7:38 PM
#10
kaylee_girl avatar

kaylee_girl

New Zenner

Join Date:
Jun 2008
Posts:
22
Plugin Contributions:
0

Re: $this_is_home_page

nevermind...

if ($current_page_base == 'product_info') {

/// code

10 Mar 2011, 4:26 AM
#12
rabarrig avatar

rabarrig

New Zenner

Join Date:
Mar 2011
Posts:
4
Plugin Contributions:
0

Re: $this_is_home_page

thanks a lot for your invaluable help, guys