Question

I'm working on a Magento 2.2.9 website that somebody has already built before me. I'm trying to change the layout for the Home page and I'm really confused about which file I should be editing. I've found that the layout will be either in default.xml or in cms_index_index.xml.

Here is the location of my default.xml:

/home/folder/site.com/html/app/design/frontend/Infortis/ultimo/Infortis_Ultimo/layout/default.xml

Here is the content of the file:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="head.additional">
        <block class="Infortis\Cgen\Block\AssetWrapper\Combined" name="head.additional.asset-wrapper" template="assets/wrapper/combined.phtml">
            <arguments>
                <argument name="asset_name" xsi:type="string">cfg.css</argument>
                <argument name="asset_id" xsi:type="string">iult</argument>
            </arguments>
        </block>
    </referenceBlock>    
</body>

Here is the location of my cms_index_index:

/home/a2b89dbe/westhort.com/html/vendor/magento/module-cms/view/frontend/layout/cms_index_index

Here is the content of my cms_index_index:

<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body/>
</page>

So, my guess is that the Home page configuration is in file urn:magento:framework:View/Layout/etc/page_configuration.xsd but I couldn't find it. Does anybody know where this file can be? Is there any other way to know how my Home page is configured?

Was it helpful?

Solution

Please reading controller: \Magento\Cms\Controller\Index\Index to know how to prepare & render Home Page.

In configuration, you can see value of field CMS Home Page. It determines 'Cms Page' which page will be the home page. So, let's check Cms Page "Home Page" to edit you site. Hope it will help you.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top