View Single Post
  #28  
Old 12-09-2007, 09:31 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Free Sitemap addon, works with XC SEO

sitemap.tpl is easy theres only one place to edit:
Code:
{include file='sitemap_recursion.tpl' categories=$list_categories loopname='top'}
I have the page {foreach item='page' from=$pages} commented out because I don't use it.

But then there is the hard part, sitemap_recursion.tpl
Code:
{foreach item='category' key='cat' from=$categories name=$loopname} <li{if ($smarty.foreach.$loopname.last && $last) || $smarty.foreach.top.last} class="last"{/if}> &nbsp;<strong> <a href="{if $category.seo_url ne ''}{$category.seo_url}{else}home.php?cat={$cat}{/if}" title="{$category.category}">{$category.category}</a> </strong> {if $category.products|@count > 0 || $category.subcategories|@count > 0} <ul> {if $category.products|@count > 0} {assign var='catlast' value='false'} {else} {assign var='catlast' value='true'} {/if} {if $category.subcategories|@count > 0} {include file='sitemap_recursion.tpl' categories=$category.subcategories loopname="loop_`$cat`" last=$catlast} {/if} {if $category.products|@count > 0} {assign var='prod_loop' value="`$loopname`_products"} {foreach item='product' from=$category.products name=$prod_loop} <li{if $smarty.foreach.$prod_loop.last && $catlast eq 'false'} class="last"{/if}> <a href="{if $product.seo_url ne ''}{$product.seo_url}{else}product.php?productid={$product.productid}{/if}" title="{$product.product}">{$product.product}</a> </li> {/foreach} {/if} </ul> {/if} </li> {/foreach}

I haven't the slightest clue what to change and what to leave.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote