Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Please help me with Page Layout Logic?

Please help me with Page Layout Logic?

Locked

Views: 767

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 Aug 2010, 2:42 PM
#1
zenhomeboy avatar

zenhomeboy

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Please help me with Page Layout Logic?

Greetings all

URL: http://bodybybamboo.com

using 1.3.9d - new install, no mods added

I am finding i need some help in navigating the structure and logic here in ZC. I have a single column design that needs to be "zennified"and I have the main page pretty much conforming to the spec I have been given. It calls for unique background images for each subsequent category page and each of them will simply use a grid of photos and descriptions, etc. of their respective products. To set each of their bg-images i need to style the #mainWrapper directive per category page.

Q1. What is the voodoo that involves creation of the appropriate directories corresponding to the category names where their respective templates live? If there is such a voodoo? In other words can ZC look info my includes/templates/my_template_name/templates/ and upon finding directory names matching my categories proceed along that path for its override files? I think I read something to that effect in the copious documentation here.

Q2. the construct "Loaded by main_page=index?cPathx" which appears in the comments of several of the template files - is set where?
I looked in tpl_main_page.php but it's not clear to me which cPath belongs to what. Or is this another red herring?

Q3. how to isolate my css so they are page or category-specific?

I'm either trapped as a prisoner in a fortune cookie factory, or
truly
eyeless in gaza.

AdVthanxANCE to all the helpful folks on this forum.

the zen Homeboy

6 Aug 2010, 2:53 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Please help me with Page Layout Logic?

  1. No. Zencart builds its pages on the fly, so there are no template files that correspond to a specific category. There is a css_read_me.txt file in includes/templates/classic/css that discusses the basics of page-specific stylesheets. There are some threads in the forums which go into more detail.

  2. Same answer, I think. When you click on the name of the first category, the URL will be: http: //www.blah.org/index.php?main_page=index&cPath=1. The '1' is the category id.

  3. Loop to 1.

6 Aug 2010, 3:45 PM
#3
zenhomeboy avatar

zenhomeboy

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Please help me with Page Layout Logic?

@stevesh

Thanx for yr prompt reply and clarification. I wish I had posted this many frustratiing hours ago.

question re: the css-read-me.txt -

it references "page-name" and also "c_??_??.css".

in the latter i imagine the "c" denotes "category" - what do the wildcards "??" indicate? a specific product-name?
ie: clothing_angeltop_info.css and dresses_slouchysweater_info.css?

as to "page-name" - could that correspond to my various category names, each having a clothing.css and a dresses.css? as well as
contact_us.css?

sorry for my obtuseness. also, the readme is dated 2005 and references

"Additional information is contained in the 'read_me' file in the common folder."

which I can't seem to find. I iwll start a new search on the forum however, - something like "page-specific stylesheets"

ADVthanxANCE

regards,

the zen Homeboy

6 Aug 2010, 3:59 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Please help me with Page Layout Logic?

'Page name' wuold refer to the c_??_?? part, in the case of product-related pages, or the specific page name in the case of non-product pages, like:

http: //www.blah.com/index.php?main_page=privacy for the Privacy Notice page.

The ?? in c_??_??.css refer to the category and subcategory while on the subcat page, like:

http: //www.blah.com/index.php?main_page=index&cPath=1_4 is category id 1, subcategory id 4.

Navigate to a product in that subcategory, and:

http: //www.blah.com/index.php?main_page=product_info&cPath=1_4&products_id=1 - category 1, subcat 4, product1.

Category names have no function in Zencart navigation, unless you make the mistake of installing one of the SEO URL rewriting mods.

6 Aug 2010, 4:31 PM
#5
zenhomeboy avatar

zenhomeboy

New Zenner

Join Date:
Jul 2010
Posts:
20
Plugin Contributions:
0

Re: Please help me with Page Layout Logic?

@stevesh

i created a c_1.css for my appropriate page is it works!

i am hushed.

thank you.