annalisa90 Posted December 30, 2016 Share Posted December 30, 2016 Hi, is it possible moving a block with code? I'll give you a practical example; I would like to move the block name='product_list_header' out of the block name='content', but when I try it disappears in front office. Thank you in advance. Link to comment Share on other sites More sharing options...
annalisa90 Posted December 30, 2016 Author Share Posted December 30, 2016 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 More sharing options...
annalisa90 Posted December 30, 2016 Author Share Posted December 30, 2016 Prestashop 1.7 Link to comment Share on other sites More sharing options...
annalisa90 Posted December 30, 2016 Author Share Posted December 30, 2016 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 More sharing options...
NemoPS Posted December 31, 2016 Share Posted December 31, 2016 That's not where they actually are, you should find where it's displaying. That code is just to "label" the block of code, and make it useable elsewhere (can't tell where off the top of my head) Link to comment Share on other sites More sharing options...
annalisa90 Posted January 2, 2017 Author Share Posted January 2, 2017 Thanks, finally I did it Link to comment Share on other sites More sharing options...
five Posted January 16, 2019 Share Posted January 16, 2019 Hello, Can you to put the solution? Thank you very much!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now