Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / turn offcategories-tab menu on every page except the main

turn offcategories-tab menu on every page except the main

Locked

Views: 2,579

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
22 Jul 2006, 2:51 AM
#1
lawman avatar

lawman

Zen Follower

Join Date:
Mar 2006
Posts:
102
Plugin Contributions:
0

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.

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

22 Jul 2006, 11:27 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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.

22 Jul 2006, 1:53 PM
#3
lawman avatar

lawman

Zen Follower

Join Date:
Mar 2006
Posts:
102
Plugin Contributions:
0

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.

22 Jul 2006, 2:17 PM
#4
lawman avatar

lawman

Zen Follower

Join Date:
Mar 2006
Posts:
102
Plugin Contributions:
0

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

Ok... I did it! :smartass:

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

<!--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:

<!--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-->