Jump to content

Moving a block


annalisa90

Recommended Posts

No I have this block {block name='product_list_header'}, which is contained in another block {block name='content'}. I want to move this block out of it, but when I try it disappears in front office, as if the {block name='product_list_header'} can exist only inside {block name='content'}.

Link to comment
Share on other sites

I write the code, maybe it's clearer.

{block name='content'}
  <section id="main">
 
    {block name='product_list_header'}
      <h2 class="h2">{$listing.label}</h2>
    {/block}
 
    <section id="products">
      {if $listing.products|count}
 
        <div id="">
          {block name='product_list_top'}
            {include file='catalog/_partials/products-top.tpl' listing=$listing}
          {/block}
        </div>
 
        {block name='product_list_active_filters'}
          <div id="" class="hidden-sm-down">
            {$listing.rendered_active_filters nofilter}
          </div>
        {/block}
 
        <div id="">
          {block name='product_list'}
            {include file='catalog/_partials/products.tpl' listing=$listing}
          {/block}
        </div>
 
        <div id="js-product-list-bottom">
          {block name='product_list_bottom'}
            {include file='catalog/_partials/products-bottom.tpl' listing=$listing}
          {/block}
        </div>
 
      {else}
 
        {include file='errors/not-found.tpl'}
 
      {/if}
    </section>
 
  </section>
{/block}
 
I want move block name='product_list_header', which contains category name, out of block name='content'
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...