Jump to content

NOINDEX in blockcategory


mr_smiley

Recommended Posts

Hello! I need help with a problem. I need to put in all that tag <noindex> highlighted in green in the attached file. All highlighted in red must be indexed. I correct file *** \ themes \ **** \ modules \ blockcategories \ category-tree-branch.tpl 
Maximum what happens then leave all <noindex> and the current category in the index, but to me it is unsuitable.
 
original:
<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.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="$branche_tpl_path" node=$child last='true'}
                {else}
                    {include file="$branche_tpl_path" node=$child last='false'}
                {/if}
            {/foreach}
        </ul>
    {/if}
</li>

my:

<li {if isset($last) && $last == 'true'}class="last"{/if}>
    {if !(isset($currentCategoryId) && $node.id == $currentCategoryId)}<noindex>{/if}<a href="{$node.link|escape:'html':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'html':'UTF-8'}">{$node.name|escape:'html':'UTF-8'}</a>{if !(isset($currentCategoryId) && $node.id == $currentCategoryId)}</noindex>{/if}
    {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>

?

post-411811-0-36410200-1402328501_thumb.png

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