Magento 2 - Custom Page LayoutMagento 2 - how to make a custom (home) page-layoutCreating a custom homepage template in Magento2Custom page templates in Magento 2How to display some module (<block>) at a particular page (main)Adding custom layouts for CMS and Category use with custom module troublelocal.xml file is not pulling in my phtml layoutEmpty page displaying in magentoMagento new custom block moduleCreate Simple Controller Not Working In My Module?Create Simple Controller Not Working In my moduleCustom page layout handleCreate Simple Controller Not Working In My Module in Magento 1.9.2?Magento 1.9.3 calling a custom block in cart page unsuccessfulMagento 1.9 add layout and template to custom module in admin
Can a stored procedure reference the database in which it is stored?
Is this a typo in Section 1.8.1 Mathematics for Computer Science?
What is the unit of time_lock_delta in LND?
What is /etc/mtab in Linux?
How bug prioritization works in agile projects vs non agile
How do I produce this Greek letter koppa: Ϟ in pdfLaTeX?
Partitioning values in a sequence
Where was the County of Thurn und Taxis located?
Is Electric Central Heating worth it if using Solar Panels?
Why did C use the -> operator instead of reusing the . operator?
Should the Product Owner dictate what info the UI needs to display?
My bank got bought out, am I now going to have to start filing tax returns in a different state?
"The cow" OR "a cow" OR "cows" in this context
Multiple fireplaces in an apartment building?
How exactly does Hawking radiation decrease the mass of black holes?
How to not starve gigantic beasts
What does "function" actually mean in music?
Why did Rep. Omar conclude her criticism of US troops with the phrase "NotTodaySatan"?
Older movie/show about humans on derelict alien warship which refuels by passing through a star
Combinatorics problem, right solution?
Retract an already submitted recommendation letter (written for an undergrad student)
Rudin 2.10 (b) Example
Find the identical rows in a matrix
Trouble removing package using Yum on CentOS7
Magento 2 - Custom Page Layout
Magento 2 - how to make a custom (home) page-layoutCreating a custom homepage template in Magento2Custom page templates in Magento 2How to display some module (<block>) at a particular page (main)Adding custom layouts for CMS and Category use with custom module troublelocal.xml file is not pulling in my phtml layoutEmpty page displaying in magentoMagento new custom block moduleCreate Simple Controller Not Working In My Module?Create Simple Controller Not Working In my moduleCustom page layout handleCreate Simple Controller Not Working In My Module in Magento 1.9.2?Magento 1.9.3 calling a custom block in cart page unsuccessfulMagento 1.9 add layout and template to custom module in admin
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I wish to add a custom home page layout in Magento 2.
In Magento 1, it's very simple, i create my module :
<?xml version="1.0"?>
<config>
<modules>
<Vendor_Custom>
<codePool>local</codePool>
<active>true</active>
</Vendor_Custom>
</modules>
</config>
and i create a config.xml
<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<custom_home_page>
<label>Custom Home Page</label>
<template>page/home.phtml</template>
</custom_home_page>
</layouts>
</page>
</global>
</config>
It's possible to do something similar in Magento 2?
magento2 module layout template
add a comment |
I wish to add a custom home page layout in Magento 2.
In Magento 1, it's very simple, i create my module :
<?xml version="1.0"?>
<config>
<modules>
<Vendor_Custom>
<codePool>local</codePool>
<active>true</active>
</Vendor_Custom>
</modules>
</config>
and i create a config.xml
<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<custom_home_page>
<label>Custom Home Page</label>
<template>page/home.phtml</template>
</custom_home_page>
</layouts>
</page>
</global>
</config>
It's possible to do something similar in Magento 2?
magento2 module layout template
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46
add a comment |
I wish to add a custom home page layout in Magento 2.
In Magento 1, it's very simple, i create my module :
<?xml version="1.0"?>
<config>
<modules>
<Vendor_Custom>
<codePool>local</codePool>
<active>true</active>
</Vendor_Custom>
</modules>
</config>
and i create a config.xml
<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<custom_home_page>
<label>Custom Home Page</label>
<template>page/home.phtml</template>
</custom_home_page>
</layouts>
</page>
</global>
</config>
It's possible to do something similar in Magento 2?
magento2 module layout template
I wish to add a custom home page layout in Magento 2.
In Magento 1, it's very simple, i create my module :
<?xml version="1.0"?>
<config>
<modules>
<Vendor_Custom>
<codePool>local</codePool>
<active>true</active>
</Vendor_Custom>
</modules>
</config>
and i create a config.xml
<?xml version="1.0"?>
<config>
<global>
<page>
<layouts>
<custom_home_page>
<label>Custom Home Page</label>
<template>page/home.phtml</template>
</custom_home_page>
</layouts>
</page>
</global>
</config>
It's possible to do something similar in Magento 2?
magento2 module layout template
magento2 module layout template
asked Jan 2 '16 at 22:46
Eric ArbeloaEric Arbeloa
26112
26112
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46
add a comment |
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46
add a comment |
2 Answers
2
active
oldest
votes
Create layouts.xml following location:
[namespace]/[modulename]/view/frontend/layouts.xml
Content should be
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="homepage">
<label translate="true">Custom Homepage</label>
</layout>
</page_layouts>
Create your new custom page layout (ex: homepage.xml) following location:
[namespace]/[modulename]/view/frontend/page_layout/homepage.xml
Content should be well structure page layout. So in your case copy of existing page layout into your custom page layout. All page layouts locate:
magento/module-theme/view/frontend/page_layout/*
add a comment |
Use 1st answer for page layout updates, but change locations:
For layouts.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/
and
For homepage.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/page_layout/
I've tried 1st answer example but it didn't work.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f95729%2fmagento-2-custom-page-layout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Create layouts.xml following location:
[namespace]/[modulename]/view/frontend/layouts.xml
Content should be
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="homepage">
<label translate="true">Custom Homepage</label>
</layout>
</page_layouts>
Create your new custom page layout (ex: homepage.xml) following location:
[namespace]/[modulename]/view/frontend/page_layout/homepage.xml
Content should be well structure page layout. So in your case copy of existing page layout into your custom page layout. All page layouts locate:
magento/module-theme/view/frontend/page_layout/*
add a comment |
Create layouts.xml following location:
[namespace]/[modulename]/view/frontend/layouts.xml
Content should be
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="homepage">
<label translate="true">Custom Homepage</label>
</layout>
</page_layouts>
Create your new custom page layout (ex: homepage.xml) following location:
[namespace]/[modulename]/view/frontend/page_layout/homepage.xml
Content should be well structure page layout. So in your case copy of existing page layout into your custom page layout. All page layouts locate:
magento/module-theme/view/frontend/page_layout/*
add a comment |
Create layouts.xml following location:
[namespace]/[modulename]/view/frontend/layouts.xml
Content should be
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="homepage">
<label translate="true">Custom Homepage</label>
</layout>
</page_layouts>
Create your new custom page layout (ex: homepage.xml) following location:
[namespace]/[modulename]/view/frontend/page_layout/homepage.xml
Content should be well structure page layout. So in your case copy of existing page layout into your custom page layout. All page layouts locate:
magento/module-theme/view/frontend/page_layout/*
Create layouts.xml following location:
[namespace]/[modulename]/view/frontend/layouts.xml
Content should be
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="homepage">
<label translate="true">Custom Homepage</label>
</layout>
</page_layouts>
Create your new custom page layout (ex: homepage.xml) following location:
[namespace]/[modulename]/view/frontend/page_layout/homepage.xml
Content should be well structure page layout. So in your case copy of existing page layout into your custom page layout. All page layouts locate:
magento/module-theme/view/frontend/page_layout/*
answered Jan 3 '16 at 4:52
Sohel RanaSohel Rana
23.6k34461
23.6k34461
add a comment |
add a comment |
Use 1st answer for page layout updates, but change locations:
For layouts.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/
and
For homepage.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/page_layout/
I've tried 1st answer example but it didn't work.
add a comment |
Use 1st answer for page layout updates, but change locations:
For layouts.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/
and
For homepage.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/page_layout/
I've tried 1st answer example but it didn't work.
add a comment |
Use 1st answer for page layout updates, but change locations:
For layouts.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/
and
For homepage.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/page_layout/
I've tried 1st answer example but it didn't work.
Use 1st answer for page layout updates, but change locations:
For layouts.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/
and
For homepage.xml
move it to
app/design/[Theme_Vendor]/[Theme_name]/Magento_Theme/page_layout/
I've tried 1st answer example but it didn't work.
edited Apr 23 at 1:39
stemon
32
32
answered May 24 '16 at 13:46
Vasilii BurlacuVasilii Burlacu
19826
19826
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f95729%2fmagento-2-custom-page-layout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
See also the topic on creating a theme in the Frontend Developers Guide.
– Steve Johnson
Jan 3 '16 at 15:46