Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Second main_page template possible? Do I attempt an override?

Second main_page template possible? Do I attempt an override?

Locked

Views: 1,204

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
17 May 2009, 12:12 AM
#1
witchyweb avatar

witchyweb

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Second main_page template possible? Do I attempt an override?

Hi all,

I've searched and searched but if there's a simple solution to this, it's not clear to me...

I have a client site- they installed Zen Cart long before my time. I'm trying to complete a redesign around their original, and am down to one task.

I need for a third menu to appear in the left hand column of "Parts" - please check out that page; http://www.attarco.com/index.php?main_page=index&cPath=5

I'm thinking the easiest way to do this is simply to create an alternate main_page template and build in the added menu:unsure:, but can't figure out how to pull that template.

The current template is custom; I've read over the override instructions but...I need some help. Please point me in the right direction- this has been dragging on for weeks.

Thanks in advance.

17 May 2009, 1:55 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Second main_page template possible? Do I attempt an override?

You can use one of the custom sidebox mods from Free Addons to hold your menu, and include a test to determine the page where it should be active. Which mod you use and what code you put in it depends on the exact functionality you want.

Alternately, you might be able to use the Documents sidebox to hold the categories you want to display there... can't tell for sure without more information.

17 May 2009, 2:11 AM
#3
witchyweb avatar

witchyweb

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Re: Second main_page template possible? Do I attempt an override?

Thanks Glenn.

The left-side menu currently is built into the main_page template. I haven't introduced any sideboxes (again, I'm working around the original install and am new to Zen Cart).

From your feedback, it seems like maybe I need to extract the left menus from the general template and instead create a sidebox containing them- then I can create an alternate sidebox with the additional links for the "parts" page.

I don't need anything more advanced than a simple set of links appearing on one page but not the others...

18 May 2009, 12:58 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Second main_page template possible? Do I attempt an override?

I see what you mean about working with that template... it's not just customized, it looks like they threw away the standard main template files and wrote totally new ones. Nearly all of the elements have different names; some of them may be built with (mostly) standard code, but I can't be sure from this end.

Is the left column turned on in Configuration > Layout Settings?
If getting sideboxes to appear via Tools > Layout Boxes Controller doesn't work, you might be able to add your list to whatever file the current sidebar is built in, with a test wrapped around it so it will only be processed on the one page.

if ($current_page_base == 'index' and $_GET['cPath'] == 5) {
  //your links
}
19 May 2009, 11:26 PM
#5
witchyweb avatar

witchyweb

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Re: Second main_page template possible? Do I attempt an override?

By way of update...

I was unable to introduce sideboxes, so in the end...I gerry-rigged some CSS to position a new left column on top of the existing one. I used negative positioning to place the content...it's not an elegant solution but I'm fine with it, so long as it doesn't break!

Thanks again for your time and advice. I have one final diemma which I'll post separately...

20 May 2009, 12:24 AM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Second main_page template possible? Do I attempt an override?

Before you invest a lot of time in the current setup, I would suggest two things:

  • upgrade to the latest version of Zen Cart - v1.3.8a
  • redesign the Template code to work with the current version

Currently there are many coding errors and looks like a very old version of Zen Cart; which can cause problems with newer Server software (eg. PHP 5.2x).

20 May 2009, 1:01 AM
#7
witchyweb avatar

witchyweb

New Zenner

Join Date:
May 2009
Posts:
8
Plugin Contributions:
0

Re: Second main_page template possible? Do I attempt an override?

Thanks, but believe it or not, we are running 1.3.8a. I think the problem is that the original designer tried to work around the system as opposed to working with it- I've already put in tens more hours than was budgeted to get it this far, so...

I need to wrap this up soon!

Btw, what kinds of errors are you finding? Are things breaking for you?

20 May 2009, 1:14 AM
#8
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Second main_page template possible? Do I attempt an override?

http://validator.w3.org/ << an excellent online Validator

The newer Gecko Browsers appear to display the pages correctly but IE 7 has problems.

Although the situation may call for expenses (work) that exceed the original budget, to continue using the current Template code will cause you untold grief with future edits. In the long run, it would be cheaper and quicker to fix what you have.