1

Our customer wanted to show category description after the product list by default, so we added a new container and the following line to the default.xml in out theme:

<move element="category.description" destination="additional-content" />

This works great and moves the category description to the desired end of the page.

However, for a few categories we'd like to show the description before the products again. To do so we added following line to the Layout Update XML under admin panel/catalog/categoreis/category/design:

<move element="category.description" destination="category.view.container" before="-" />

This doesn't seem to have any effect at all.

We already tried adding page- and body-tags, and also do it with a <referenceContainer name="some.parent"> around it. Nothing had any effect.

The only thing we can do with the block right now is deleting it with:

<referenceBlock name="category.description"  remove="true" />

Which means the Layout Update XML itself works but it won't move the block to the desired location

Are there different rules for the xml when using Layout Update XML from admin panel compared to the theme's default.xml? Or anything else we are doing wrong?

0

Please try below code in the catalog_category_view.xml file. It will display after the products.

<move element="category.description" destination="content" after="category.products" />

Thanks

0

As a workaround, I moved my "additional-content" to the desired location. It seems to me that once an element was moved in the theme's XML, it can't be moved by Layout Update XML from the admin panel. With the following XML snippet in the admin panel i did the trick:

<move element="additional-content" destination="category.view.container" before="-" />

So instead of moving the actual element in the XML and the admin panel, i move it into another container from the XML and move that said container from the admin panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.