| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Back to Basics - How do I get SubCats on Left Nav? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I am bringing the site back to some basic features and would like to have the categories and subcategories appear as in this thumbnail: http://forum.x-cart.com/attachment.php?attachmentid=613&d=1194132256 I had FancyCats active since the site launched in 2004. Can't seem to get the site to appear higher in search results. About 8 months ago I started to use Manufacturers. Those pages have just the default navigation and light CSS styling. They now rank higher with less content than my 6 years or older Category pages. The only thing I can think of is the JavaScript on FancyCats mod getting in the way. So I disabled the mod and would like to rearrange the categories and make some root categories into child categories for easier navigation. However, when I move a root category to a subcategory status, it disappears from the left navigation. I could not find a setting in General Settings>Appearance or Modules to force the subcategories to display. I want to show them with some kind of visual clue to their hierarchy. The thumbnail above is exactly what I want, but I can't figure out how to make it display that way. Any ideas? Here is the code in categories.tpl {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {else} {foreach from=$subcategories item=c key=catid} <font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if} {/if} Thanks!
__________________
Vera B 4.4.5 CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO Hosting by EWDHosting - The best home for your x-cart. |
|||||||
#2
|
|||||||
|
|||||||
![]() Tried this but the site would only load the header, nothing else:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} {if $cat eq $c.categoryid || $current_category.parentid eq $c.categoryid} <font class="CategoriesList"><b><a class="current" href="home.php?cat={$c.categoryid}">{$c.category}< /a></b></font><br> {else} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br> {/if} {assign var=in value=$c.categoryid} {foreach from=$allsubcategories.$in item=c } {if $cat eq $c.categoryid}     <a href="home.php?cat={$c.categoryid}" class="SubCategoriesList">{$c.category}<br></a><br> {/if} {/foreach} {else} {foreach from=$subcategories item=c key=catid} <a href="home.php?cat={$catid}">{$c.category}</a> {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding} I see some closing statements that look to be too many, but can't figure it out pass this point. Any suggestions? Thanks!
__________________
Vera B 4.4.5 CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO Hosting by EWDHosting - The best home for your x-cart. |
|||||||
#3
|
|||||||
|
|||||||
![]() Well, I'm start to feel like I'm talking to myself here, but anyway. Got it to work to the point where the subcategories appear when you are on the parent category page, thanks to those who posted here:
http://forum.x-cart.com/showthread.php?t=13345&highlight=show+subcategorie s After a day of trial and error, it works fine. Also made some changes to include/categories.php as instructed in the thread above. Subcategories only show in the main category page so I'm trying to work with that. The problem is that no matter what I do, I can't change the font on the subcategories or even indent them for a visual clue. It is confusing and hard to tell there are different options on the navigation bar when you are in any category page. This is what the categories.tpl looks like, if it can save someone else some time, I'm happy. {* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br /> {foreach from=$allcategories item=cat} {if $cat.parentid eq $c.categoryid}<font class="CategoriesList"><a href="home.php?cat={$cat.categoryid}" class="VertMenuItems">{$cat.category}</a> </font> <br /> {/if} {/foreach} {/foreach} {else} {foreach from=$subcategories item=c key=catid}     <font class="SubCategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding} - - - - - - I created a new CSS class, SubCategories list. This is how the VertMenuItems looks like in skin.css: Vertical menu */ .VertMenuLeftColumn { VERTICAL-ALIGN: top; PADDING-LEFT: 6px; PADDING-RIGHT: 20px; } .VertMenuRightColumn { VERTICAL-ALIGN: top; PADDING-LEFT: 20px; PADDING-RIGHT: 6px; } .VertMenuBox { PADDING: 1px; text-align: left; } .VertMenuBorder { } .VertMenuTitle { COLOR: #e66321; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; } .VertMenuSubTitle { BACKGROUND-COLOR: #eee8da; } .VertMenuTitleIcon { WIDTH: 24px; HEIGHT: 24px; MARGIN-LEFT: 8px; MARGIN-RIGHT: 8px; VERTICAL-ALIGN: middle; } .VertMenuItems { COLOR: #000000; TEXT-DECORATION: none; text-align: left; } A.VertMenuItems:link { COLOR: #A88B42; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; TEXT-DECORATION: none; text-align: left; } A.VertMenuItems:visited { COLOR: #A88B42; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; TEXT-DECORATION: none; text-align: left; } A.VertMenuItems:hover { COLOR: #e66321; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; TEXT-DECORATION: none; text-align: left; } A.VertMenuItems:current { COLOR: #e66321; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; TEXT-DECORATION: none; text-align: left; } A.VertMenuItems:active { COLOR: #A88B42; FONT-SIZE: 12px; FONT-WEIGHT: bold; TEXT-TRANSFORM: uppercase; TEXT-DECORATION: none; text-align: left; } .VertMenuHr { WIDTH: 100%; HEIGHT: 1px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; COLOR: #ACA490; } .CategoriesList { FONT-SIZE: 12px; } .SubCategoriesList { FONT-SIZE: 10px; } /* Does anyone have any suggestions as to what I am doing wrong? I can't even get the subcats to indent, I would be happy with that. Thanks again.
__________________
Vera B 4.4.5 CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO Hosting by EWDHosting - The best home for your x-cart. |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|