Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [page-layouts]

The tag has no usage guidance.

0
votes
1answer
8 views

Wrong Layouts in Adminhtml

I noticed a strange behaviour 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
0answers
10 views

2 columns-left category product list page layout, how to change left side bar width?

The left side bar width for the category product listing page is now became smaller, i'm not sure how it has been changed. I believe not in "catalog_product_view.xml", and i can't find another other ...
0
votes
1answer
14 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 ...
2
votes
3answers
24 views

Move block and set template

I succesfully moved the product related block in my page layout with <move element="catalog.product.related" destination="product.info.right" after='-'/> I want now to apply a custom template ...
1
vote
1answer
28 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
1answer
19 views

Magento : Is the layout reference scoped for an specific handle?

When I put the following block inside catalog_category_layered handle, it works and I can call it by getChildHtml(). But when I insert it in default handle it doesn't work at all. Is the catalog.layer....
0
votes
1answer
92 views

Magento 2 Add css class to <a> tag in customer account navigation

I try to assign a CSS class to navigation ( tag) under customer account page. I found this file customer_account.xml, and I added <argument name="css_class" xsi:...
1
vote
1answer
76 views

How to create custom 403 error page in magento2

How can I create a custom error pages in my Magento 2 site. For example this pages: 500, 401, 403, and 404. I tried for create block: $layout = $this->_view->getLayout(); $block = $layout-&...
2
votes
1answer
89 views

Magento 2 product page include custom phtml file before reviews section

Can anyone help me how to include custom phtml file before reviews section in magento2 please find the screenshot below: When i click on the button it is going to add to cart. Thanks
0
votes
1answer
32 views

Magento 2: How to add block inside block html content through XML file

I have created my custom arithmetic captcha. I want add that captcha to my custom form through xml file without defining in phtml file on custom layout. For example: Testimonail submit form: ...
0
votes
0answers
47 views

catalog_category_view.xml just target no anchor pages

I'm trying to create a different layout for non anchor category pages in Magento 2.3 (1 column, big masthead category image, move page title and breadcrumbs down). Where should I put these changes so ...
0
votes
1answer
37 views

Magento 2 Block class instantiate issue

I am using Magento 2.2.6. In my custom module I add catalog_category_view.xml add a block <?xml version="1.0" ?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
17 views

Grouped product layout based on product custom attribute

I am new to Magento and using version 2.2 for my store. I would like to have a different layout for a specific grouped product. I tried a product layout based on product custom attribute. I followed ...
1
vote
1answer
296 views

Magento 2 custom layout full width

I created a new custom page_layout that I want to make full width. My fullwidth-layout.xml file looks currently like this. But I want to make the main content full width. So that I can set this ...
0
votes
2answers
72 views

Magento 2 add new argument in the reference block and get into the phtml

I am working on reference block concept, in that I need to add new arguments and get the argument value on the .phmlt file. in catalog_product_view.xml I've added the below line of code. <...
1
vote
0answers
32 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 ...
0
votes
1answer
20 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
1answer
108 views

How do I display a custom grouped product page layout?

I would like my Magento 2.2.6 store to have two grouped product pages. For some grouped products I would like to use the existing default grouped product layout that ships with Magento 2. For other ...
0
votes
1answer
211 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/...
1
vote
2answers
45 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?
0
votes
2answers
362 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
58 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
71 views

How to include LESS in specific page layout

I have created my custom page_layout in magento 2 and now I want to add some less only in my page_layout. I don't want to load those less file in other layouts. How I can achieve it?
0
votes
1answer
184 views

How can I change more images thumbnail image placement on product page?

I want to show more views images thumbnail in the left of the main image. Anyone please suggest me how can I do that.
4
votes
1answer
575 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-...
0
votes
1answer
154 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 ...
2
votes
0answers
46 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
2answers
635 views

Magento 2 admin, add new 'Text Field' into order information page?

Using magento 2.2 Admin, I want to add textField into Sale > Order > Information > Order & Account Information like image. How to do?
0
votes
0answers
34 views

Different category view XML for each page layout

Is it possible to define a different catalog_category_view.xml for each page layout. For example if I am editing a category in Magento and choose the "1 column" layout I want it to use one ...
0
votes
0answers
23 views

Magento 2.2 : will a catalog_product_view_[CustomAttribute]_[Yes/No].xml works?

In my Magento 2.2.4 theme, I already did a <theme>/Magento_Catalog/layout/catalog_product_view_id_XXX.xml as a test, and it worked great, applying the configuration to only the item with the ID ...
0
votes
1answer
66 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....
2
votes
3answers
399 views

How to remove container from homepage only

I added div(container) in every page except homepage like this <main> <div class="myclass"> all content here </div> </main> I tried ...
0
votes
1answer
103 views

Call Menu Block on CMS Page from two column layout to one column layout in Magento 1.9

I am trying to modify one column layout on my custom theme by adding menu block from two column (left bar layout) in Magento 1.9. I added a snippet of advancedmenu block from column layout from 2 ...
0
votes
1answer
203 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...
3
votes
1answer
2k views

Magento2 : Get Current Page layout

I have Added Custom page layout in my store.And set Test Category Page But when I try to get my phtml file in category page $request = $objectManager->get('Magento\Framework\App\Request\Http'); $...
0
votes
2answers
710 views

How to change the contents in the header of Magento 2 [duplicate]

I have attached the screenshots images of my store and the model how it should appear. I have to change according to that. can anyone please help how to change or customize the header of the magento 2....
0
votes
3answers
168 views

add div main-content in magento 2x

How to add div main-content above in magento 2.2 please advance thanks for help
2
votes
1answer
342 views

Magento 2 : How to add Conditional Links in Layout?

I've added my custom link to top.links using layout.xml Vendor/Module/view/frontend/layout/default.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
4
votes
1answer
352 views

What is the use of page_types.xml at magento2

I am seen that some of magento modules has page_types.xml at configuration section means ../etc/frontend section. <page_types xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
91 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/...
0
votes
1answer
13 views

Problems overriding default template in Magento V-1.9

Pretty basic thing I am doing , and I am reasonably new to Magento theming. I want a 1column layout as the default layout for the home page , and I have copied the base 1column.phtml to app\design\...
0
votes
1answer
2k views

Magento2 - How to get a custom attribute for catalog product?

I need to get a custom attribute for catalog products on the product page. I added code, <?php $_getMyAttr = $_product->getResource()->getAttribute('my_custom_attr'); ?> <?php if ($...
1
vote
0answers
55 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/...
0
votes
1answer
53 views

Product Page Layout After Seaching

I have an issue in Magento 1.9. If I click on a product in the category page the product page loads fine with the 3 column layout. Great. But if I search for the same product using the search box ...
2
votes
1answer
583 views

How to add layered navigation in Magento 2 on Top After Menu

I tried to move layered navigation from left-side to top of the products.But Nothing displays When I changed the page layout from 2 column layout to 1 column layout then it shows only product list.
0
votes
1answer
50 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....
1
vote
0answers
37 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 ...
4
votes
0answers
686 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 ...
2
votes
4answers
5k views

Add .phtml file on all pages magento 2

I want to add my custom.phtml file on the top of all pages. How can I do this using custom module ? Any suggestion would be appreciated. Thanks
2
votes
2answers
277 views

How do I override layouts.xml - Magento 2

I am trying to override the file app/code/Magento/Theme/view/frontend/layouts.xml I do not want to extend this file, I want to override it so that some of the base design layouts are not available in ...