Results 1 to 8 of 8
  1. #1
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default 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?mai...=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, 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.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.

  3. #3
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default 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...

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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.
    PHP Code:
    if ($current_page_base == 'index' and $_GET['cPath'] == 5) {
      
    //your links


  5. #5
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default 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...

  6. #6
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default 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).

  7. #7
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default 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?

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default 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.

 

 

Similar Threads

  1. v139h My javascript override in modules/pages/main_page is not seen
    By sharonob in forum Templates, Stylesheets, Page Layout
    Replies: 20
    Last Post: 16 Jan 2012, 07:37 AM
  2. an override attempt didn't work
    By mzimmers in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 4 Sep 2010, 04:18 PM
  3. override tpl_categories.php on main_page only
    By k4satin in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 6 Oct 2008, 09:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR