I want to move cms static block before breadcrumbs. My static block name ves_element_top.
1 Answer
To rearrange elements you need to use the <move>
tag.
Here's the official documentation about it: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html#layout_markup_rearrange
In your case I reckon the right code would be something that looks like this:
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="your.static.block.name" destination="page.top" before="breadcrumbs"/>
</body>
</page>
Don't forget to change the element
attribute value with the value of your block name.
-
2