View Single Post
  #1  
Old 01-10-2018, 02:34 AM
 
Paulw Paulw is offline
 

Senior Member
  
Join Date: Jul 2004
Location: United Kingdon (Manchester)
Posts: 134
 

Default Alter subcategories_t.tpl to remove categories from homepage

{*
$Id: subcategories_t.tpl,v 1.2 2010/06/08 10:17:47 igoryan Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{list2matrix assign="items_matrix" assign_width="cell_width" list=$categories row_length=3}
{if $items_matrix}
<div class="subcategories_t">
{foreach from=$items_matrix item=row name=items_matrix}
{assign var="additional_class" value=""}
{if $smarty.foreach.items_matrix.first}
{assign var="additional_class" value="first-row"}
{elseif $smarty.foreach.items_matrix.last}
{assign var="additional_class" value="last-row"}
{/if}
{foreach from=$row item=subcategory name=items}
<div {interline name=items additional_class=$additional_class|cat:" item"}>
{if $cat gt 0}
<a class="item-title" href="home.php?cat={$subcategory.categoryid}">{$su bcategory.category|escape}</a>{if $config.Appearance.count_products eq "Y"} <b>({*$lng.lbl_N_products|substitute:products:$sub category.product_count*}{$subcategory.product_coun t})</b>{/if}<br />
{/if}
{if $subcategory.is_icon}
<a class="image" style="width: {$subcategory.image_x}px;" href="home.php?cat={$subcategory.categoryid}"><img src="{$subcategory.icon_url|amp}" alt="{$subcategory.category|escape}" width="{$subcategory.image_x}" height="{$subcategory.image_y}" /><span class="tr"></span><span class="tl"></span><span class="rb"></span><span class="bl"></span></a>
{else}
<img src="{$ImagesDir}/spacer.gif" alt="" width="1" height="{$subcat_img_height}" />
{/if}
<div class="details">
{if $cat eq 0}
<a class="item-title" href="home.php?cat={$subcategory.categoryid}">{$su bcategory.category|escape}</a><br />
{if $subcategory.childs ne ""}
<ul>
{foreach from=$subcategory.childs item=v}
<li><a href="home.php?cat={$v.categoryid}">{$v.category}< /a>{if $config.Appearance.count_products eq "Y"} <b>({$v.product_count})</b>{/if}</li>
{/foreach}
</ul>
{/if}
{elseif $subcategory.short_descr ne ""}
{$subcategory.short_descr}
{/if}
</div>
</div>
{/foreach}
<div class="clearing{if !$smarty.foreach.items_matrix.last} separator-h{/if}"></div>
{/foreach}
<div class="separator-v i1"></div>
<div class="separator-v i2"></div>
</div>
<div class="clearing"></div>
{/if}

Hoping someone will be able to help. I have recently been dropping in google for my main keywords and think that one issue is due to too many links from my homepage. I'm now looking to remove all category links shown on the homepage as I have the top navigation anyway. Does anyone know how I would alter the template to have the desired effect?

Many thanks
Paul

X-cart 4.4.1
__________________
X-Cart Gold V 4.4.1
Reply With Quote