View Single Post
  #7  
Old 04-17-2006, 02:02 AM
 
vixnfox vixnfox is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Adelaide, South Australia
Posts: 82
 

Default Splitting the category menu

Following on from above:
If you follow the link, here is how I made the photography menu.
Add the category as usual using Admin, it appears in the main category menu on the left.
Exclude the Photography and Restoration menus from categories.tpl
Code:
{section name=cat_num loop=$categories} {assign var="tmp" value = $categories[cat_num].category} {if $tmp ne "Photography" && $tmp ne "Restoration"} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/if} {/section}

in home.tpl find
Code:
{ include file="customer/categories.tpl" }
and add this:
Code:
{include file="ourpages/photo_menu.tpl"}


This is photomenu.tpl
Code:
* $Id: photo_menu.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} {section name=cat_num loop=$categories} {assign var="tmp" value=$categories[cat_num].category} {if $tmp eq"Photography"} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {elseif $tmp eq "Restoration"} <FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/if} {/section} {else} {section name=cat_num loop=$subcategories} <FONT class="CategoriesList">{$subcategories[cat_num].category}</FONT> {/section} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_photomenu_content menu_content=$smarty.capture.menu }
... and add the label $lng.lbl_photomenu_content using Admin languages - in this case Photography.

The restoration part is not a category as such, and is added to home_main.tpl as a static page.
Code:
{elseif $main eq "restoration"} {include file="./ourpages/restoration.tpl"}



vixnfox
__________________
V 4.3.1 Live:

Developing on
PHP 5.3.0
MySQL server 5.0.75-community-log
MySQL client 5.1.36
Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11
Windows 7 64bit on a Toshiba Satellite P500

ADELAIDE, SOUTH AUSTRALIA
Reply With Quote