Align Content in Order View Magento2
-
15-01-2021 - |
Question
I added content using this Instruction
It's Working fine! Content is coming! But i need my custom Content at last! I don't want my custom content in middle of something! How can i align that??
My sales_order_view.xml file is this
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="order_info">
<block class="Backend\RewriteSales\Block\Adminhtml\Order\View\Custom" name="sales_order_view_custom" template="order/view/custom.phtml" />
</referenceBlock>
</body>
</page>
Solution
Try the below xml code:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Backend\RewriteSales\Block\Adminhtml\Order\View\Custom" name="sales_order_view_custom" template="order/view/custom.phtml" after="-" />
</referenceContainer>
</body>
</page>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange