Jump to content

disable block categories on cms pages


r2get

Recommended Posts

Hello,

 

For my site i want to disable the block categories left when you open a cms page...

 

I have modified the block template to this:

 

 

{if $page_name === 'cms' }

{else}


<!-- Block categories module -->
<aside id="categories_block_left" class="block">
{* <h4>{l s='Categories' mod='blockcategories'}</h4> *}
<div class="block_content">
<ul class="tree {if $isDhtml}dhtml{/if}">
{foreach from=$blockCategTree.children item=child name=blockCategTree}
{if $smarty.foreach.blockCategTree.last}
{include file="$branche_tpl_path" node=$child last='true'}
{else}
{include file="$branche_tpl_path" node=$child}
{/if}
{/foreach}
</ul>

<script type="text/javascript">
// <![CDATA[
// we hide the tree only if JavaScript is activated
$('#categories_block_left ul.dhtml').hide();
// ]]>
</script>
</div>
</aside>
{/if}

 

it works.... BUT it should show the block categories also on the new product page because the if statement says so...

 

but it doesnt work..

 

 

UPDATE

I now found that it just doesnt work good sometimes is shows both blocks on a cms page and sometimes it just shows the cms links (wich is good)

 

But i can not figure out why this is happening.......

Edited by r2get (see edit history)
Link to comment
Share on other sites

  • 2 years 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...