0

It seems when i debug my custom layout, it is not getting called!

UPDATED ANS:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <action method="setTitle">
        <argument name="title" xsi:type="string">My Title</argument>
    </action>
</head>
<body>
    <reference name="root">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Vendor_Module::page/3columns.phtml</argument>
        </action>
    </reference>
    <referenceContainer name="left">
        <!-- <block class="Vendor\Module\Block\Filter" name="custom_filter" before="-"/> -->
        <block class="Vendor\Module\Block\Navigation" name="custom_filter" before="-"/>
    </referenceContainer>
    <referenceContainer name="content">
        <block template="Vendor\Module::product/list.phtml" class="Magento\Catalog\Block\Product\ListProduct" name="product_list">
            <block template="Vendor\Module::toolbar.phtml" class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar">
                <block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
            </block>
            <action method="setToolbarBlockName">
                <argument name="name" xsi:type="string">product_list_toolbar</argument>
            </action>
        </block>
    </referenceContainer>
</body>
</page>

So when i hit the localhost/magento/m/result/index If my layout file is rendered, i should get the file in my custom debug file which logs the layout called.

Controller path: Controller/Result/Index.php

layout file: mypage_result_index.php

router : route id="mypage" frontName="m"

2
  • any error are display? Aug 11, 2016 at 12:53
  • No exception.log or error ...jus blank page
    – Sushivam
    Aug 11, 2016 at 12:57

1 Answer 1

0

Try with below code, you have to replace Vendor\Module with Vendor_Module

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <action method="setTitle">
        <argument name="title" xsi:type="string">My Title</argument>
    </action>
</head>
<body>
    <reference name="root">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Vendor_Module::page/3columns.phtml</argument>
        </action>
    </reference>
    <referenceContainer name="left">
        <block class="Vendor\Module\Block\Navigation" name="custom_filter" before="-"/>
    </referenceContainer>
    <referenceContainer name="content">
        <block  class="Magento\Catalog\Block\Product\ListProduct" name="product_list" template="Vendor_Module::product/list.phtml">
            <block template="Vendor_Module::toolbar.phtml" class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar">
                <block class="Magento\Theme\Block\Html\Pager" name="product_list_toolbar_pager"/>
            </block>
            <action method="setToolbarBlockName">
                <argument name="name" xsi:type="string">product_list_toolbar</argument>
            </action>
        </block>
    </referenceContainer>
</body>
</page>
1
  • I have updated the answer @Rakesh, with Vendor_Module, but still it is not getting called!
    – Sushivam
    Aug 16, 2016 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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