Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Sidebox Overrides cont.?

    Hey everyone,

    in continuing the archived post about controlling sideboxes dependent on the page...

    using the code:

    Code:
    if ($_GET['main_page'] == 'index'){
      $show_(my sidebox) = true;
    } else {
      $show_(my sidebox) = false;
    }
    has been working good. but i want to turn a sidebox ON for the main page, and OFF for the product listing pages. it seems they are both considered 'index'

    is there a way for me to separate the two?


    thanks in advance...

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sidebox Overrides cont.?

    By index do you mean your home page?

    If so, there is a variable for this:
    $this_is_home_page
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: Sidebox Overrides cont.?

    thanks for your help, Ajeh.

    i'm basically trying to find a way to differentiate, the index.php page from the index product listing page.

    ($_GET['main_page'] == 'index')

    the product listing page URL is ...index.php?main_page=index&cPath

    would it work if i used:
    Code:
    ($_GET['main_page'] == 'index&cPath')
    wondering if i can define that separately from the index page when turning off sideboxes?


    i'm guessing your saying to pass that variable... but i'm not sure where to do it...

    any advice would be appreciated.

    thanks again...

  4. #4
    Join Date
    Apr 2006
    Posts
    72
    Plugin Contributions
    0

    Default Re: Sidebox Overrides cont.?

    Did you find a solution for this?

    PL

  5. #5
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: Sidebox Overrides cont.?

    PL,

    no unfortunately, i never did. still wondering...

    i did use to have a dog that looked exactly like that though!

    crazy...


    i'll post it if i figure out the answer.

  6. #6
    Join Date
    Apr 2006
    Posts
    72
    Plugin Contributions
    0

    Default Re: Sidebox Overrides cont.?

    He's a Rhodesian Ridgeback!

    For me I don't want the right sidebox to appear on the home page but I do want it in the cat listings and elsewherer - which is opposite of you. The /index trick doesn't work because it affects all pages that call the index. So the following works for me:

    Instead of:

    */ $flag_disable_right = true; /**

    I do this:

    */ if (empty($cPath)) $flag_disable_right = true; /**

    This bases the column status on the status of the cPath variable (as shown in the address bar of the browser in cat listings). If that cPath variable is empty, the page will NOT display the right column.


    Since we want opposite results, you should try this one instead:

    */ if (!empty($cPath)) $flag_disable_right = true; /**

    If that cPath variable is NOT empty (as in all category pages), the page will NOT display the right column but it will on the home page.

    Hope that helps,

    -PL

  7. #7
    Join Date
    May 2006
    Posts
    313
    Plugin Contributions
    0

    Default Re: Sidebox Overrides cont.?

    makes sense to me. should work perfect. thanks for the help..!

 

 

Similar Threads

  1. Sidebox Overrides not working.
    By pippa_oz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Nov 2010, 08:42 AM
  2. Center the side box cont
    By Mistique in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 28 Aug 2010, 01:19 PM
  3. Displaying +30 Attributes in att.cont.
    By Tully in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Nov 2007, 10:38 PM

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