I'm using the luma demo for practicing.
I want to create and add a new block in my homepage like this:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="page.wrapper">
<block name="myblock"/>
</referenceContainer>
</body>
</page>
It worked but I want to change this block's order before the tag "main" which class name is "page-main".
I've tried this code :
<referenceContainer name="page.wrapper" before="main"> or
<referenceContainer name="page.wrapper" before="page.main"> or
<referenceContainer name="page.wrapper" before="page-main">
None of this works. Even I put a move tag like this:
<move element="myblock" destination="page.wrapper" before="main" /> or
<move element="myblock" destination="page.wrapper" before="page.main" /> or
<move element="myblock" destination="page.wrapper" before="page-main" />
How can I put my block before that?