Jump to content

free module for Image/Icon in category menu


shotagl

Recommended Posts

<li {if isset($last) && $last == 'true'}class="last"{/if}>
    <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>
    {if $node.children|@count > 0}
        <ul>
        {foreach from=$node.children item=child name=categoryTreeBranch}
            {if $smarty.foreach.categoryTreeBranch.last}
                {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='true'}
            {else}
                {include file="$tpl_dir./category-tree-branch.tpl" node=$child last='false'}
            {/if}
        {/foreach}
        </ul>
    {/if}
</li>

 

where must I write this code?

Link to comment
Share on other sites

<li {if isset($last) && $last == 'true'}class="last"{/if}>

HERE
    <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>

Link to comment
Share on other sites

<li {if isset($last) && $last == 'true'}class="last"{/if}>

HERE

    <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>

 

this has no effect

Link to comment
Share on other sites

  • 8 months later...

Not sure what you asking.  But if I'm following this thread correctly, you're not understanding what Vekia provided in the code in #2 above.  I'll break it down a bit more in an example.  When he writes: <img src="PasteUrlToImageHere"/>  the part in " " is the path to the icon image.  You can upload them to whatever image folder you want.  The one below- img/c  -is just an example.

 

{if $node.id==5}

<img src="http://yourstore.com/img/c/whatever.ico"/>

{/if}

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...