Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    117
    Plugin Contributions
    0

    Default turn offcategories-tab menu on every page except the main

    I'm trying to turn off the categories-tab menu for every page except the main (first) page. I added and $_GET['main_page'] == 'index') to tpl_header and it got me a little closer but it still shows the tab-menu on the category pages.

    Code:
    <!--bof-optional categories tabs navigation display-->
    <?php
    if (CATEGORIES_TABS_STATUS == '1' and $_GET['main_page'] == 'index') {
      require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
    }
    ?>
    <!--eof-optional categories tabs navigation display-->
    I'll keep playing 'round with it but if someone could help me out I'd appreciate it.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: turn offcategories-tab menu on every page except the main

    I am not a good coder but as this is also linked through the admin to toggle on and off changing the =1 to =0 I would insure that this statement remains intact or you will loose this ability.

    When toggled to display, you would need some conditional statement to check if this is the mainpage or not and corresponding 'else > then' conditions.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Mar 2006
    Posts
    117
    Plugin Contributions
    0

    Default Re: turn offcategories-tab menu on every page except the main

    Thanks Kobra... that is what I'm trying to do with the "If" statement above. If Tabs=1 and main page = "index" then show it else don't.

    Problem is that I don't know how to isolate only the index page as $_GET['main_page'] == 'index' doesn't quite do it.

    when I click on a category or subcategory the main page is still index with a path on it. e.g. main_page=index&cPath=22

    I'm afraid to try too much more for fear of blowing the whole thing up... I'm too close to the finish line.

  4. #4
    Join Date
    Mar 2006
    Posts
    117
    Plugin Contributions
    0

    Default Re: turn offcategories-tab menu on every page except the main

    Ok... I did it!

    To only display the tabs-menu on the main-page I changed

    Code:
    <!--bof-optional categories tabs navigation display-->
    <?php
    if (CATEGORIES_TABS_STATUS == '1') {
      require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
    }
    ?>
    <!--eof-optional categories tabs navigation display-->
    TO:

    Code:
    <!--bof-optional categories tabs navigation display-->
    <?php
    if (CATEGORIES_TABS_STATUS == '1' and $_GET['main_page'] == 'index' and $current_category_id=='') {
      require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
    }
    ?>
    <!--eof-optional categories tabs navigation display-->

 

 

Similar Threads

  1. Adding "All Products" as a main tab on the main page centerbox?
    By JohnnyScience in forum Addon Templates
    Replies: 1
    Last Post: 1 May 2013, 08:25 AM
  2. v151 help removing slider banner from every page except home page
    By Johnnycopilot in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 13 Mar 2013, 08:42 AM
  3. v151 Turn Off Columns Except for Product Page
    By SPH in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Nov 2012, 10:10 PM
  4. Removing Main navigation bar except on Main page
    By Redcinamn in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Oct 2007, 08:39 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