Re: Displaying Category Name in a Product Description
I found this old post when trying to do the same thing... or close to. I want to have a simple link "Back to {Category Name}" on my product pages.
Here's what I came up with that works for me on 4.5.2 using the $location loop I found in breadcrumbs.tpl. I created a new language variable and made a custom breadcrumbs.tpl file which I call only for the product pages.
{if $location}
{foreach from=$location item=l name=location}
{if $smarty.foreach.location.index == $smarty.foreach.location.total - 2}
<div class="backtocat">
<div class="label">
<a href="{$l.1|amp}"><div class="icon"></div>{$lng.lbl_back_to} {$l.0}</a>
</div>
</div>
{/if}
{/foreach}
{/if}
__________________
X-Cart 4.5.2 Gold Live
X-Cart 4.7.3 Gold Dev
|