Jump to content

external link under a category name


Recommended Posts

Hi,

 

In /modules/blockcategories/category-tree-branch.tpl you can use {if $node.id == YOUR NODE CATEGORY ID } for place the link.

 

normal / line 28:

 

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

 

you can replace the link just for this category :

 

<a href="{if $node.id == YOUR NODE CATEGORY ID}http://www.dsfstore.ro/jucarii{else}{$node.link}{/if}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>

 

Without a test... I hove this will help you

Link to comment
Share on other sites

Dear mr. Mederic can you please help me to replace it?

here is the original .tpl content:

 

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

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

{if $node.children|@count > 0}

<ul>

{foreach from=$node.children item=child name=categoryTreeBranch}

{if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}

{include file="$branche_tpl_path" node=$child last='true'}

{else}

{include file="$branche_tpl_path" node=$child last='false'}

{/if}

{/foreach}

</ul>

{/if}

</li>

"

 

Thank you again and i hope you can help me.

Link to comment
Share on other sites

you can replace with this code (I used the node category name because I don't know the id)

 

<li {if isset($last) && $last == 'true'}class="last"{/if}>
<a href="{if $node.name == 'Jucarii'}http://www.dsfstore.ro/jucarii{else}{$node.link}{/if}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
{if $node.children|@count > 0}
<ul>
{foreach from=$node.children item=child name=categoryTreeBranch}
{if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
{include file="$branche_tpl_path" node=$child last='true'}
{else}
{include file="$branche_tpl_path" node=$child last='false'}
{/if}
{/foreach}
</ul>
{/if}
</li>

 

Tell me if it works.

Link to comment
Share on other sites

Did you try without the cache ? without the compilation ?

 

Maybe with the ID

 

<li {if isset($last) && $last == 'true'}class="last"{/if}>
<a href="{if $node.id == 7}http://www.dsfstore.ro/jucarii{else}{$node.link}{/if}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'}</a>
{if $node.children|@count > 0}
<ul>
{foreach from=$node.children item=child name=categoryTreeBranch}
{if isset($smarty.foreach.categoryTreeBranch) && $smarty.foreach.categoryTreeBranch.last}
{include file="$branche_tpl_path" node=$child last='true'}
{else}
{include file="$branche_tpl_path" node=$child last='false'}
{/if}
{/foreach}
</ul>
{/if}
</li>

Link to comment
Share on other sites

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...