Jump to content

Block Reasurrance module


Recommended Posts

I need block reassurance module not to display on category ID 116. I tried to modify blockreassurance.tpl to look like this, but the code just creates more problems.

{if $category.id!=116}
{if $elements}
  <div id="block-reassurance">
    <ul>
    
      {foreach from=$elements item=element}
        <li>
          <div class="block-reassurance-item">
            <img src="{$element.image}" alt="{$element.text}">
            <span class="h6">{$element.text}</span>
          </div>
        </li>
      {/foreach}

    </ul>
  </div>
{/if}
{/if}

Does anyone have the solution?

Link to comment
Share on other sites

4 hours ago, spiralciric said:

I need block reassurance module not to display on category ID 116. I tried to modify blockreassurance.tpl to look like this, but the code just creates more problems.


{if $category.id!=116}
{if $elements}
  <div id="block-reassurance">
    <ul>
    
      {foreach from=$elements item=element}
        <li>
          <div class="block-reassurance-item">
            <img src="{$element.image}" alt="{$element.text}">
            <span class="h6">{$element.text}</span>
          </div>
        </li>
      {/foreach}

    </ul>
  </div>
{/if}
{/if}

Does anyone have the solution?

Could you please explain which errors produce your code. It seem to be good, but you just make sure that $category var is already set in tpl. If not you can get id_category param from $_GET like this: $smarty.get.id_category

Regards

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