Skip to main content
added 12 characters in body
Source Link

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it isthey are not.

I have't inspected itthis in depth however one static way to go around this is to create in a custmocustom module etc/frontend/page_types.xml and add your page layout like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName.

When i catch time ill investigate how to make this dynamically but from what iI have seen their code is not dynamic either for now.

I can understand from one side why it has been done like this to use page layouts but the issue is page layouts also do not work and is a confirmed bug https://github.com/magento/magento2/issues/9537

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it is not.

I have't inspected it in depth however one static way to go around this is to create in a custmo module etc/frontend/page_types.xml and add your page like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName.

When i catch time ill investigate how to make this dynamically but from what i have seen their code is not dynamic either.

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but they are not.

I have't inspected this in depth however one static way to go around this is to create in a custom module etc/frontend/page_types.xml and add your page layout like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName.

When i catch time ill investigate how to make this dynamically but from what I have seen their code is not dynamic either for now.

I can understand from one side why it has been done like this to use page layouts but the issue is page layouts also do not work and is a confirmed bug https://github.com/magento/magento2/issues/9537

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it is not. 

I have't inspected it in depth however one static way to go around this is to create in a custmo module etc/frontend/page_types.xmletc/frontend/page_types.xml and add your page like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php/Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle methodaddHandle method add in foreach echo $name and in else statement add echo $handleName. 

When i catch time ill investigate how to make this dynamically but from what i have seen their code is not dynamic either.

If anyone has nay better idea for now please do yell.

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it is not. I have't inspected it in depth however one static way to go around this is to create in a custmo module etc/frontend/page_types.xml and add your page like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName. When i catch time ill investigate how to make this dynamically but from what i have seen their code is not dynamic either.

If anyone has nay better idea for now please do yell.

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it is not. 

I have't inspected it in depth however one static way to go around this is to create in a custmo module etc/frontend/page_types.xml and add your page like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName. 

When i catch time ill investigate how to make this dynamically but from what i have seen their code is not dynamic either.

Source Link

It's definitely a bug or i would say more likely an overlook from magento 2 team. Magento 2.2.5 When you create the cms page you would expect the page types will get updated automatically but it is not. I have't inspected it in depth however one static way to go around this is to create in a custmo module etc/frontend/page_types.xml and add your page like this

<page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_types.xsd">
<type id="cms_page_view_id_about-us" label="CMS Pages (About us)"/>

</page_types>

Id is your handle of the page. You can get all handles by enabling developer tools in admin or in /Applications/MAMP/htdocs/appliance.loc/vendor/magento/framework/View/Model/Layout/Merge.php in addHandle method add in foreach echo $name and in else statement add echo $handleName. When i catch time ill investigate how to make this dynamically but from what i have seen their code is not dynamic either.

If anyone has nay better idea for now please do yell.