Questions tagged [page-layouts]

The tag has no usage guidance.

62 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
1k views

Magento 2.2 sidebar and additional sidebar issue

My Magento installation behaves weird. Sidebar main and sidebar additional do not display on the same level as column main as it should but Magento layout engine moves them under the column main. I ...
5
votes
3answers
2k views

Show product of a category in a custom page

I create a category with some product. Also create a custom layout for my page that I add new cms page with this layout that I created. I need to have this page with my layout because I want to add ...
4
votes
1answer
2k views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
4
votes
1answer
270 views

Magento 2: How to create custom layout instructions to match a custom product page layout?

I am trying to work on a product subscriptions page which is very different in function from a standard product page. I have created my new Magento_Theme/page_layout/subscription.xml I set Magento 2 ...
3
votes
1answer
573 views

Product image disappears on product page when using a custom page layout

I'm creating a custom theme on Magento 2.1. I create a custom layout for the product page in app/design/frontend/<theme_name>/base/Magento_Catalog/layout/catalog_product_view.xml, here it is: &...
2
votes
1answer
732 views

Magento 2 - Move Block Not Working

I've created a faqs.xml for a bespoke page template and this is my code: <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
2
votes
0answers
63 views

1.9: programatically switch CMS page template in Observer

For a bunch of reasons, I'd like to be able to switch a CMS page's template based on some PHP. In config.xml: <frontend> <events> <...
2
votes
0answers
2k views

Change order of CSS and JS in the <head> section of the page

Where is the block with CSS and JS in the <head></head> rendered? And how to change the order of the elements from that section? (this screenshot is from Magento 2 demo) I'd like to ...
2
votes
0answers
508 views

Magento2 : Page_layout Container And Widget Configuration

I'm new on Magento 2, I have created a custom theme and a custom page_layout in /app/design/frontend/[Vendor]/[ThemeDir]/Magento_Theme/page_layout/homepage.xml <referenceContainer name="page....
2
votes
0answers
1k views

Page layouts in Magento 2 — matching old .phtml files

short of it I need to dynamically set the htmlClass of a <container> that is defined in the layout file. <?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights ...
1
vote
0answers
77 views

Error add new block into block Magento 2

I'm using Magento 2.3.4 and t tried to append a block to another block like this in my controller: $category_list_subcategories = $resultPage->getLayout()->getBlock('promotion.view....
1
vote
1answer
43 views

Magento2 - Adobe XD to Magento2 font size

On the xd design the font-size is 55 and when I apply this font-size in my Magento layout It is bigger ? Why is it so?
1
vote
0answers
25 views

Magento 2 How can I add 2columns-left in container area like the one I have shared

I want to add 2 columns one for the menu and other for the text in container Page.top is the menu container which I have move into a new container Now In that new container page top after banner I ...
1
vote
1answer
41 views

Move theme layout elements on a product view from within a Module Magento 2

I am having trouble moving the short description on the product page. I tried with the move command within the layout file without any luck. I can move any new created block where I want but I can't ...
1
vote
0answers
68 views

Magento 2 - CMS Specific page_layout XML and Dedicated page_layouts in general?

I'm looking for some BEST PRACTICES insight into using page_layout.xml. Is it a good idea to try and decouple the non-shared resources on Product Pages, Category Pages and CMS Pages? If so, what's the ...
1
vote
2answers
60 views

Change page layout for all products

I need to change all my products to the page layout "2column left". Now is everything set on 1column. How can I do this in one step for all the products?
1
vote
0answers
119 views

Custom layout extending 2columns-left.xml

I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far: I created the layouts.xml file THEME/...
1
vote
0answers
78 views

Magento 2 randomly applying wrong custom layout

I have got an issue applying custom layout to a CMS page. I am on Magento 2.2.0 Enterprise edition on a multiserver stack. Here is my configuration : File Vendor/Theme/view/frontend/page_layout/...
1
vote
0answers
38 views

Attribute tag is not working in layout magento 2.2

I am facing attribute tag issues in the layout XML after upgrading to Magento-2.2. I have added the below tag in the "Layout Update XML" field of Magento cms page but it's not working. Can you please ...
1
vote
0answers
46 views

Product View Html

I'm having a problem with the position of some of the objects of my product page. For example the header of the description is not aligned with the menu on the left and I have a little too much white ...
1
vote
1answer
1k views

Magento 2 - How to remove catalog.leftnav only from category pages with 2columns-right.xml

I have created a Magento 2 module which has some customization for the category pages. I would like to remove catalog.leftnav when the category is using the "2 columns with right bar" layout. Is ...
1
vote
0answers
717 views

Magento 2 Custom Page Layout Not Working

I am trying to create a custom page layout for my theme which is a child of Magento Blank theme. I got the folder structure like this File: app/design/frontend/Company/themename/Magento_Theme/layouts....
1
vote
1answer
809 views

Single column layout for category and search results

I have Magento 2 installed and am using the Luma theme. I've disabled the wishlist and compare but I still have a left sidebar on the category and search result pages. Which files do I have to edit/...
1
vote
0answers
66 views

Custom page layout

I want to create a page with a custom layout but it doesn't respond to my changes. I'm trying to remove the header within this page. I've added layouts.xml to ../app/design/frontend/themevendor/theme/...
1
vote
0answers
599 views

How to add a new container to my layout

I am trying to add a new container for configurable options in my layout and call the child theme from a custom view. Here is the part of the code from my view.phtml : <?php if ($_product->...
1
vote
0answers
38 views

use theme colors while writing my template and blocks

Please take a look at the image below: For the human eye its pretty clear that this site has a main theme color, which is the bluish color that the title, bars, and links share. It's very rare to ...
1
vote
1answer
122 views

Add custom to field to CMS page based on template in Magento 2

I have several custom fields I added to my CMS pages but I only want them to show up on the backend if the admin user selects a specific template. For example, the text field "doctor name" ...
0
votes
0answers
13 views

Magento 2 - Change load order of custom page layout

I created a new page layout, but I noticed that it does not get loaded last and it gets overridden from other layouts. Is there a way to change the load order so that my custom page layout gets loaded ...
0
votes
0answers
18 views

Move Search Box to left of logo in header

In Magento2.4 I want to move the search bar to the left of the logo then have the logo center and then have the shopping cart stay where it is on the right side of the header. I edited the code at ...
0
votes
1answer
18 views

How to replace a .phml file without rewrite the entire block

I have a custom extension working fine. It has some features that only usable when this extension is installed and enabled so I decided to create a custom footer.phtml and put it under my extension ...
0
votes
1answer
22 views

How to remove specific JS and CSS in Magento2 using page_layout/empty.xml

I have created New page_layout empty.xml. I need to remove some JS and CSS from this layout. I already try <remove src="print.css"/> But it gives an error Exception #0 (Magento\...
0
votes
0answers
38 views

<head> Page Configuration on a Custom Page Layout XML in Magento 2

I've created a Custom page_layout through my own Theme for an About Us page. Through the tutorial of the Magento DevDocs, it was quite clear on how to declare the Custom CMS layout by a handle in ...
0
votes
0answers
22 views

Show or hide elements for specific storefront in Magento 2

I am running a Magento 2 multistore installation. I added a new storefront, which is almost the same as the main store (same layout/theme, but different logo, colors etc). However, on the product ...
0
votes
0answers
58 views

Layout switcher for product view magento 2.3.5 (Custom layout update)

Since the update to Magento 2.3.x it is possible to change the layout of the product output using a product id or sku: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/product-...
0
votes
2answers
653 views

Magento 2 Move Short Description below product image

I am new to magento2 and I have very few knowledge about it, I am using Porto theme on magento 2.3.0 CE. I am trying to move the short description under the product image. Here is what I have : Here ...
0
votes
1answer
21 views

Important div tag commented out when on production mode

We noticed that some of our page layout has been broken. Did some debugging and found out that when in production mode there are some errors with the tags. Specifically: <!--?php <?php <?...
0
votes
0answers
30 views

How do I refresh data when I hit Tab on the left in magento2

When developing editing pages of background management pages, currently magento2 does not refresh the data when switching different Tab pages. I want to refresh the page data when switching tabs. What ...
0
votes
1answer
38 views

Magento2 - Modify surrounding divs of layouts

I'm using the 2columns-left as a layout for my category pages and I want to modify these divs, change their classes, without having to add javascript afterwards. I can already modify the templates ...
0
votes
1answer
44 views

Magento 2 - Admin product page layout issue

I am facing an issue while trying to go on the product page from a catalog in the admin. The product page grid layout not loading properly. Every time when I clear cache, page load correctly. What is ...
0
votes
1answer
225 views

Change page layout dynamically depending on url parameter

The standard layout of my categories is 2-columns-left so that the layered navigation is visible in my shop. What I want is, to use the same categories to display content. This is an example for my ...
0
votes
1answer
73 views

Wrong Layouts in Magento2 Adminhtml

I noticed a strange behavior in a M2 System, I think this is related to a 3rd party module. All layouts which should be 1column layouts are 2 column layouts actually so something overwrites the ...
0
votes
1answer
258 views

How to center a block on a page?

I have a block with a visual menu in it and I want to show up centered on the page. This is my css within the block: .container{ margin: 0 auto; text-align:center; } I've also tried to put the ...
0
votes
1answer
60 views

Custom Layout Update on product not working for description and short description

We're using Magento 2.2.6. If we create a custom layout update for the description and short description of a product nothing happens in frontend. Still the old fields are outputted. How can we ...
0
votes
2answers
2k views

Magento 2: How to change page layout from to 1column

What's up guys, i know this is some kind of basic question, but here's the thing, i can't change page layout from catalog_product_view.xml to 1column. I've try using new custom theme, and EVERY ...
0
votes
0answers
88 views

Magento 2 layout xml is not working

I am creating page layout using xml <referenceContainer name="content"> <container name="page.container.main" htmlTag="div" htmlClass="page-container-main" before="-"> <...
0
votes
1answer
157 views

Magento 2.2 Theme Layout

Can anyone elaborate the theme structure of Magento 2.2. I already refer the Theme document for it. Also I want to change the category page layout so please guide me. Category description block is ...
0
votes
1answer
237 views

Magento2 blank white screen after clicking on custom menu item

When I print anything from controller it works, but when i try to add .phtml with this code, blank screen appears app/code/Company/Configuration/view/adminhtml/layout/configuration_admin_settings....
0
votes
1answer
583 views

move product overview below product review in Magento2?

help me to move the product overview below product review in product details page like this...and help me to make qty and add to cart button in a single line...
0
votes
1answer
486 views

Template not being loaded

UPDATE: I implemented this solution to check the loading of layout which confirms that my layout is being loaded. But not my template. UPDATE 2: I even tried installing another version of magento 2.1....
0
votes
2answers
1k views

Dislpay custom attribute in Product view page - in Product description template

I am working on magento 1.9.2 RWD theme and I am trying to display the product additional info via custom attribute. I have created the attribute - Admin Default Store View faq FAQ ...