Questions tagged [layout]

Denotes the xml files used to define the block hierarchy which eventually renders the template files.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Change Products per Page on Grid Default Value using custom layout xml - Magento 2.4

For some specific categories we would like to change the default value for Products per Page on Grid Default Value. By default it's set to 24. In our custom theme we create a custom page_layout with ...
JGeer's user avatar
  • 1,421
0 votes
0 answers
7 views

Arguments shared between multiple instances of same block

I have created a custom block and tried to insert it multiple times in the same page: <block class="MyCompany\MyModule\Block\Producttabs\CategoryProducts" name="category.products....
zekia's user avatar
  • 620
0 votes
2 answers
21 views

How can I make the button be black and white with round edges?

Banners have the correct button I want, black with white text and rounded edges The buttons added to the page have a burgundy boarder and blue text Can someone help as I cant find this anywhere in ...
user114366's user avatar
0 votes
0 answers
15 views

How to toggle custom tab visibility in product view with event observer based on custom attribute's value (custom layout handle)?

There is a custom tab "Ask Question" in a product that has a form (it has a logic for saving data to the database). My task is to create an event observer for the attribute that I have ...
Dramorian's user avatar
1 vote
1 answer
16 views

Adding CSS for specific CMS Page via Layout Update XML - Magento 2.4.x

I want to add the custom css for specific CMS Page, I know we can create a new theme for it but I want to use the Layout Update XML Or by adding it to empty page layout directly. Currently, if I add ...
Sheri's user avatar
  • 140
0 votes
1 answer
29 views

Change layout based on url parameter - Magento 2.4

We created a custom module, to load a observer before layout_load_before. And then we would like to change the custom layout, based on a url parameter ?content-only=yes. For some reason it does not ...
JGeer's user avatar
  • 1,421
1 vote
1 answer
42 views

main.CRITICAL: Class block does not exist error in log files but extension works?

I have a working extension that show reviews, but sometimes there's an error in the system.log file, and I don't know why? var/log/system.log: [2023-10-26T11:20:42.925466+00:00] main.CRITICAL: Class &...
Aknot's user avatar
  • 288
0 votes
0 answers
19 views

Updating layout product page, by placing div's into a new div - Magento 2.4.6

On our productpage we would like to place the two default div's product.info.main and product.info.media into a new div. How can we achieve this by updating the catalog_product_view.xml? In this case ...
JGeer's user avatar
  • 1,421
0 votes
0 answers
24 views

Output XML attribute deprecated?

The "output" attribute has never been necessary for me to use, but I didn't understand it very well, there is not much information in the documentation. I saw that you can (supposedly) use ...
Juan Gaytan Sustaita's user avatar
0 votes
1 answer
50 views

Magento 2 How to override configurable.phml file in custom module

I have tried below way to override configurable.phtml file /app/code/Vendor/Extension/view/frontend/layout/catalog_product_view_type_configurable.xml https://i.imgur.com/gpII3Ct.png But it did not ...
Keval Chauhan's user avatar
0 votes
0 answers
21 views

Add Javascript to a Single Custom Admin Configuration Page in Magento 2.4 with XML

I am developing a custom module and need to load a javascript function on my "Custom" admin configuration page created with system.xml at url "admin/system_config/edit/section/<...
Fox's user avatar
  • 161
0 votes
0 answers
31 views

Magento 2 category shows all catalog products instead of its actual products after setting its layout to a custom layout

I have the following issue with a magento 2.4.3 category: Using the default theme (having the category's Design/[No layout updates] option selected), it properly shows its products and their number: ...
Robert's user avatar
  • 43
0 votes
2 answers
63 views

Override the canonical URL in custom layout handler

I'm attempting to override the canonical URL for a custom handler. I tried adding the following code via XML, but instead of overriding the default canonical URL, I now have both the default and the ...
Anass Hl's user avatar
0 votes
0 answers
18 views

Magento2: Translate META TAGS (Meta description) in layout XML files

We have created a custom page that is shown on some specific situations. We successfully modified the META tags inside section in various layout files. The question is: How can we make this text ...
TheAgent's user avatar
0 votes
0 answers
14 views

Third Party Module Layout Override - use custom module or within theme directory

When overriding a layout xml file from a third-party module, example being Amasty, is it best to include the new xml file within a custom module, within app/code, or within the theme directory, that ...
A. Andersen's user avatar
1 vote
5 answers
376 views

Magento 2.4.6 - No such entity with cartId - checkout_cart_index.xml

We face the issue that we sometimes get the error in the exception.log: Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = #0 /vendor/magento/module-quote/...
JGeer's user avatar
  • 1,421
0 votes
2 answers
736 views

Add Custom Field for creating new order from admin in Magento 2.4

I want to add new field while we create new order from the Magento admin. So, any one has any reference for this ?
Mitul Vadalia's user avatar
0 votes
1 answer
39 views

How to load external es6 script module in Magento

Is it possible to add a script tag with the attribute type set to module e.g. type="module" in magento? I'm trying to load a es6 module through the head of the xml file but it is not ...
Alfredo Esteban Hernndez Dvalo's user avatar
0 votes
1 answer
29 views

How to override a node in an xml file of a ui_component

I have this xml file in some third party module having this content <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
Bob's user avatar
  • 11
0 votes
2 answers
99 views

Rename export csv file

Is there a way to rename the default export.csv filename to another filename? I'm using the magento 2 export in my listing.xml
jsnewbie21's user avatar
0 votes
0 answers
26 views

Override layout file in vendor directory of theme

I have created a theme in vendor directory. I want to override layout xml files in my theme directory. I have theme-frontend-themename. I have a folder in this directory named Magento_Theme. I want to ...
Mehreen's user avatar
  • 11
0 votes
1 answer
123 views

Is there any way to get system configuration value as true false in layout file(which is exists inside ui_component) array item in magento2?

I just wantend to get system configuration value inside the layout file which is exists in ui_component folder, in below code I just wantend to get system configuration value as true/false in the ...
Mark's user avatar
  • 43
0 votes
1 answer
44 views

Is there any way to get system configuration value in layout file which is exists inside ui_component

I just wanted to get system configuration value inside layout file which is exists inside ui_component, is there any way ?
Eion's user avatar
  • 13
1 vote
2 answers
166 views

Insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in register.phtml

I want to insert a custom block into the $block->getChildHtml('customer.form.register.extra') placeholder in the customer registration form - called in the Magento_Customer::form/register.phtml ...
David Lightman's user avatar
0 votes
1 answer
99 views

Different header/footer for guest users

I want to show different header and footer for the guest users and default one for the logged-in users. What is the right way to do so ? AND using the custom module to achieve this.
Cv Gandhi's user avatar
0 votes
1 answer
111 views

Ratio of images changed after update

After updating from Magento 2.3.5 to Magento 2.4.5-p1, I noticed that the aspect ratio of 1 image of 1 specific productpage has been changed. The rendered size, rendered aspect ratio, intrinsic size ...
JanosDjango's user avatar
0 votes
1 answer
26 views

Move multiple blocks in Magento 2 without xml

I need to move several elements of a layout without using layout.xml I have followed the bellow code to create an observer and it correctly moves a single element. When I try adding the other elements ...
nickcobb's user avatar
0 votes
3 answers
55 views

How to print custom attribute on Product listing page?

my catalog_category_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
Akhil's user avatar
  • 1
0 votes
1 answer
29 views

View invoice in backend breaks page (layout will not load)

The version of my magento2 is 2.3.5-p1. Here is the problem: We will open the invoice view in backend. So we go to: ->Sales->orders->select an order ->go to Invoices->view Does someone ...
Alex's user avatar
  • 3
0 votes
2 answers
68 views

How to double extend Magento_Checkout/js/view/summary/item/details in Magento 2

is it possible to extend a new checkout_index_index.xml on top of already existing one I created a projectA/app/design/frontend/MageBig/martfury/projecta/Magento_Checkout/layout/checkout_index_index....
Mohd Farhan Bin Ramli's user avatar
0 votes
0 answers
23 views

Magento 2.4 move cart page shipping rates on top of the page

Hi I need to remove the cart page shipping rates list under the "Estimate Shipping and Tax" and move that block on the top of cart page. Can you give me some support to do that. SO far I ...
Sahan Thilakarathna's user avatar
0 votes
1 answer
438 views

Exception: Namespace prefix xsi for type on argument is not defined in Merge.php / Extra content at the end of the document

We are using justbetter/magento2-sentry for catching errors in our Magento 2.4.5-1 shop and have lots of reports of such errors: Warning: simplexml_load_string(): namespace error : Namespace prefix ...
Alex's user avatar
  • 13.7k
-1 votes
1 answer
36 views

getting blank page after creating custom layout

I have created custom layout as below created 3-columns-double-footer.xml file inside Magento_Theme/page_layout folder <?xml version="1.0"?> <layout xmlns:xsi="http://www....
Hitesh Agrawal's user avatar
0 votes
1 answer
11 views

Page configuraion is not in its right place (page_layout/catalog_category_view.xml)?

This file (vendor/magento/module-page-builder/view/frontend/page_layout/catalog_category_view.xml) belongs to namespace xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...
Dmitriy Morozov's user avatar
0 votes
0 answers
19 views

Products are not displaying

I'm not sure what is going on. I can add a product on a fresh install and the product page is empty. Now if I do a search the product will display and you can place it in the cart. In the product page ...
Michael Nelson's user avatar
0 votes
1 answer
435 views

Save custom frontend form data to database magento 2.4.5

I have created custom form on frontend and now on submit click I want to save filled data to database. module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
Rakhi Prajapati's user avatar
0 votes
0 answers
57 views

How to reorder the mobile menu tablist in Magento 2.4.3 default.xml

I am looking for the simplest way to reorder the mobile menu tabs in my custom theme inheriting luma on Magento Open Source 2.4.3. Both tabs are showing fine but I can not use before 'store.links' or ...
MADT's user avatar
  • 21
0 votes
1 answer
66 views

Block that doesn't explicitly declare template?

I recently followed a tutorial to add a custom fee to the checkout summary of my Magento store and after getting everything working, I realized that the block I created didn't need to have an ...
A. Andersen's user avatar
0 votes
1 answer
319 views

Move sign In or Create Account links to new container next to cart icon in header

Does anyone know how to achieve below design. Create a new container next to cart icon in header move top bar sign in and create account links to new container. Please kindly refer the screenshot ...
Kyle Reeze's user avatar
0 votes
2 answers
88 views

Custom Header Link Layout Update

I have added the below code to app/design/frontend/Company/Theme/Magento_Theme/layout/default.xml but the link is not appearing in the header. Can someone please tell me what I am missing? <...
A. Andersen's user avatar
1 vote
1 answer
86 views

After changing to developer mode, I am facing the error Element 'remove': This element is not expected

After changing to developer mode, I am facing the error My site is working perfectly until I change it to developer mode Product page & News event page showing error. All other pages are working ...
Usman Ahmed's user avatar
0 votes
0 answers
28 views

Magento 2 adding a block on top of add to cart and quantity for configurable products

I am trying to add a custom block on top of the quantity and add-to-cart on the product details page for all products by making changes to catalog_product_view.xml. I am able to achieve this using ...
Oat Wongsajjathiti's user avatar
1 vote
0 answers
98 views

magento 2.4.4.p2 cms page save Custom layout update is invalid

I am trying to save the existing cms page getting Custom layout update is invalid after upgrading 2.3 to 2.4.4 p2 getting this error. if I save a new page saving properly works fine I have checked the ...
Pawankumar's user avatar
0 votes
0 answers
88 views

Magento 2.4 how add tabs ui_component in module custom adminhtml

Good morning, could someone help me render some tabs in adminhtml with a custom module? I already managed to create the tabs, but the content is not displayed correctly, it is added in the same space ...
GStiven's user avatar
  • 31
2 votes
2 answers
787 views

Magento 2 ui/form/field template Error since Upgrade from 2.3.7 to 2.4.5-p1

since I updated from Magento 2.3.7 to 2.4.5-p1 I'm getting some errors with some xml layouts. On one of my XML files where I had <item name="template" xsi:type="string">ui/...
Alguve's user avatar
  • 23
0 votes
1 answer
168 views

How to stop external JS from being load from specific layout in Magento?

Magento provides a way to include external js or css using following method. <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url"...
Vishal Rathod's user avatar
0 votes
1 answer
278 views

Magento 2 - Move header links to side of mini cart

I am trying to move the top content of the header panel to by the minicart: I have tried several methods such as: <move element="header.links" destination="header-wrapper" ...
sulman's user avatar
  • 529
0 votes
1 answer
58 views

Validate if render referenceBlock in checkout layout

I have tried validate if render referenceBlock in checkout layout, but it does not work. I added block Vendor\Module\Block\Index in layout after referenceBlock Vendor/Module/view/frontend/layout/...
Diego Castro's user avatar
0 votes
2 answers
58 views

Unable to display product name in catalog_product_view.xml

I am new at Magento, I would like to render the product name to catalog_product_view.xml (product page) from a custom phtml but it didn't work. May I know where did I go wrong? Thanks! app/code/...
hill2011's user avatar
0 votes
1 answer
78 views

Add css file to layout not working

I try to add a css file to a new layout for a cms page (magento 2): src/app/design/frontend/NAME/default/Magento_Theme/page_layout/lpmdd-without-header.xml <?xml version="1.0" ?> <...
blind's user avatar
  • 1

1
2 3 4 5
54