Zen Cart Logo
Forums / General Questions / Add to a specific page

Add to a specific page

Views: 605

Results 1 to 5 of 5
4 Aug 2015, 1:35 PM
#1
racingtech avatar

racingtech

New Zenner

Join Date:
Nov 2012
Location:
US
Posts:
61
Plugin Contributions:
0

Add to a specific page

I have an add (year make model) that I would like to show up on the certain pages but only when certain categories are selected.

How do I choose which page to add the code to or do I need to make an ezpage and link it to that.

The normal category page would be fine, but I don't need it to show up on all categories.

Thanks

4 Aug 2015, 3:51 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Add to a specific page

racingtech:

I have an add (year make model) that I would like to show up on the certain pages but only when certain categories are selected.

How do I choose which page to add the code to or do I need to make an ezpage and link it to that.

The normal category page would be fine, but I don't need it to show up on all categories.

Thanks

There are three methods I can think of to do this, each with pros and cons.

  1. Provide the PHP code (properly wrapped in span or div tags) so that it shows up on each category, and then use CSS to hide it on all but the applicable categories. This can also be reversed to be always hidden but shown only on the select category(ies).
  2. Code the information to be shown only on the selected categories to be controlled by some "process" whether it be add the product to a category (display this ad) or by a new admin option, or by hard coding the category(ies).
  3. Use swguy's boilerplate template to add applicable code to say the category description and/or the product(s) that are to have that information.

I'm sure there are other ways as well, but that to me seems like a method to keep the work and result down to the area of concern...

4 Aug 2015, 5:40 PM
#3
racingtech avatar

racingtech

New Zenner

Join Date:
Nov 2012
Location:
US
Posts:
61
Plugin Contributions:
0

Re: Add to a specific page

Thank you very much. Once again you've started me down a path.

4 Aug 2015, 9:19 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,808
Plugin Contributions:
15

Re: Add to a specific page

You have many options. Take a look at the CSS_read_me.txt that's in the template_default/css folder on your site.

5 Aug 2015, 4:35 AM
#5
racingtech avatar

racingtech

New Zenner

Join Date:
Nov 2012
Location:
US
Posts:
61
Plugin Contributions:
0

Re: Add to a specific page

dbltoe:

You have many options. Take a look at the CSS_read_me.txt that's in the template_default/css folder on your site.

Thank you will take a look.