Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Posts
    57
    Plugin Contributions
    0

    Default Enabling/disabling left column based upon page ID

    I have a site/service that is used as both a true shop as well as for services, I have been using ezPages and various custom pages to describe the services. This mostly works out well. However there are cases where I would like to disable the left column completely when you land on specific pages, similar to the way some ordinary CMS's handle this through modules and menus. So, say I have a page like either:

    index.php?main_page=page&id=54

    or

    index.php?main_page=ProductList (this is a custom page similar to 'define_pages' function

    And the question, how would I, in which template file, set up a php if/else test such as to not display the left column if page id is xyz or page name = whatever?

    <?php if ($id == 99 )
    {
    // exclude the left colum
    }

    This will make it much easier to create wide pages talking to the service without the distraction of the left column stuff.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Enabling/disabling left column based upon page ID

    Check includes/templates/template_default/css for css_read_me.txt which will describe how to create page-specific stylesheets. Then just add to the sheet for that page something like: #navColumnOne {display: none;}

    Also this: http://www.zen-cart.com/content.php?...ome-pages-only
    Last edited by stevesh; 9 Apr 2013 at 04:23 PM.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,892
    Plugin Contributions
    96

    Default Re: Enabling/disabling left column based upon page ID

    Scrolling down this page to the "Similar Threads" yields: http://www.zen-cart.com/showthread.p...-by-page-basis.

    It's similar, just disabling right instead of left.

  4. #4
    Join Date
    Jan 2006
    Posts
    57
    Plugin Contributions
    0

    Default Re: Enabling/disabling left column based upon page ID

    Quote Originally Posted by stevesh View Post
    Check includes/templates/template_default/css for css_read_me.txt which will describe how to create page-specific stylesheets. Then just add to the sheet for that page something like: #navColumnOne {display: none;}

    Also this: http://www.zen-cart.com/content.php?...ome-pages-only
    In my case I added: #column-left { display:none; } to the $custom_template/css/$page.css file and this worked purrfectly! Thx.

 

 

Similar Threads

  1. v151 Disabling right column of template on page by page basis
    By retched in forum Basic Configuration
    Replies: 11
    Last Post: 7 Jan 2013, 06:23 PM
  2. Shipping based upon quantity
    By jtjohnston in forum Built-in Shipping and Payment Modules
    Replies: 17
    Last Post: 22 Feb 2008, 08:40 PM
  3. Disabling Saved cart upon login
    By J Price in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Sep 2007, 05:29 PM
  4. Conditional Enabling / Disabling of attributes
    By zenrajan in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Mar 2007, 07:05 AM

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