Questions tagged [layout]
Denotes the xml files used to define the block hierarchy which eventually renders the template files.
2,789
questions
0
votes
0
answers
20
views
You cannot proceed with such operation, your reCaptcha reputation is too low error when register customer in magento2
I have added login and register form on same login page. But i am getting this error as below
You cannot proceed with such operation, your reCaptcha reputation is too low.
Before i have two different ...
1
vote
1
answer
30
views
Adding layout handles to blocks in cms pages
We have a cms page with a content like this:
<p>Lorem Ipsum</p>
<div>{{block class="Vendor\Module\Block\Feature" block_id="feature_wrapper_block"}}</div>
&...
0
votes
0
answers
10
views
Magento2 How to set the Layout option default selected to 1 column?
Magento2 How to set the Layout option default selected to 1 column in following dropdown?
0
votes
0
answers
74
views
magento 2.4 hide custom address attribute from billing address only
I've created a custom address attribute via \Setup\Patch\Data and it's showing correctly on address forms, both on customers and checkout. However, I'd like this attribute to be shown in shipping ...
0
votes
1
answer
14
views
Magento 2 how to add ttl attribute to referenceBlock?
I need to add ttl="3600" to a referenceBloc, I would override the whole catalogsearch_result_index.xml but there are some third parties modules that crash if I override the whole file.
so I ...
0
votes
0
answers
61
views
Add UI Component in the Custom Block
Made the layout file in which I have called the custom block.
<?xml version="1.0" encoding="UTF-8"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
0
votes
1
answer
44
views
Magento 2: How to set catalog product description input field using WYSIWYG instead of page builder?
After i upgrade my Magento version to 2.4.3, the product description input field in backend becomes page builder input field, i want to revert it back using the regular wyiswyg input field without ...
0
votes
1
answer
28
views
How do I hide "Search engine Optimization" from product add/edit admin panel?
As the question states, im simply trying to hide the "Search Engine Optimization" from the admin panel, how would I do that? Im not sure whether there's somewhere where id be able to place
...
0
votes
1
answer
22
views
Magento2 : Layout block what is the difference between acl="" and aclResource"" attribute
I've been trying to figure out the difference between acl and aclResource both attributes available for <block> directive.
I know that aclResource is useful to render the block based on specific ...
0
votes
1
answer
32
views
Magento 2 layout XML reference block added in CMS page
I have a CMS page, and in certain place it references a custom block from my module as such:
{{block class="My\Notification\Block\NotificationForm" name="notification.form" ...
0
votes
0
answers
63
views
Extension Layout won't work when using a custom theme
I have built an extension intending it to add a block underneath the Add to Cart button on the catalog product page.
My extension layout file isn't being executed - instead it just executes my custom ...
0
votes
1
answer
38
views
Can't add block below add to cart button
I am new to Magento and would like to add a custom block underneath the 'Add to Cart' button.
Here is my catalog_product_view.xml file:
<?xml version="1.0"?>
<page xmlns:xsi="...
0
votes
2
answers
44
views
Magento 2 add JS only on specific static page
I have created one static page, I wanna load specific JS only on specific static page, Here my static page name is ship_custom_page
If I have to load specific JS in product page so I am using ...
0
votes
0
answers
51
views
Add a price element to all buttons on a product page
I expect this result.
in catalog_product_view.xml I add wrapper container for the add-in that container 2 blocks. Price and Add to cart button block.
<container name="product.price.wrapper&...
0
votes
0
answers
21
views
Move mini cart in second container
I've moved some elements through default.xml file. One of those elements, the top search, is moved.
At desktop it's into the right position however not on mobile view. I'm wondering if it's possible ...
0
votes
0
answers
18
views
Magento 2.4.3 Layout override is not working
I have recently upgraded Magento 2.3.3 to 2.4.3 and installed claue 2 theme, and created my own child theme in separate folder (not user MGS folder), child theme works fine except that any layout ...
1
vote
1
answer
169
views
Magento 2.4.3 CMS Page custom layout update
I am trying with no luck to update a layout to a specific page only to our Magento 2.4.3 store.
CMS Page URL key is:
product-finder
I have created in child theme folder this xml file:
app/design/...
0
votes
1
answer
132
views
How can I display the categories and subcategories in my admin form like in the product page?
I am trying to add the categories and subcategories in a small panel Exactly like the one in the product panel
and I want to add it in here instead of this XML field like the "toOptionArray"...
0
votes
2
answers
37
views
Magento 2: add left sidebar in cms page
I try to define the new design layout and call the left sidebar in cms pages.
What I do:
app/design/frontend/Vendor/Theme/layout01/Magento_Theme/layout/layouts.xml
<?xml version="1.0" ...
0
votes
1
answer
106
views
Magento 2 - Use knockoutjs and html instead of phtml
How can I use html and knockoutjs on a custom site which is accessible from a custom controller?
For example my controller route is threepartment/vault/index
If I go to:
www.example.com/threepartment/...
0
votes
1
answer
27
views
Where to find Path of the price element in Magento 2
I have installed a payment method extension and it requires adding the following;
Can I please know what element to input and where to find the path?
Thank you
0
votes
0
answers
38
views
Magento2 description attribute value not getting displayed when set via page builder
Magento2 description value is not getting displayed when the added from page builder layout & layout from admin is set to No layout option.
It only get displays for product full width if set
How ...
0
votes
1
answer
15
views
Magento2 How can we set 2 layout?
When we create a product via admin by default product-full-width is set under Design > Layout > Product Full Width
When we are importing products it is not set so we need to set it via XML
I ...
0
votes
2
answers
31
views
Create a custom layout for certain categories in 2.4
I want to create a custom layout for one or more categories. I followed the next steps:
Extended and customized <theme_dir>\Magento_Catalog\layout\catalog_category_view.xml (layout instructions ...
0
votes
0
answers
34
views
Can't add item into checkout_index_index.xml in Magento 2
I am using a theme purchased for my Magento site and therefore have a one-page checkout. I would like to add the general conditions of sale on the last part but I cannot modify the template XML file. ...
0
votes
1
answer
27
views
Magento2.4.2 layout
Is there any difference between the two layouts
0
votes
1
answer
111
views
Magento2.4 for cms page add layout
Have custom layout updates generally available for all pages, categories and products, so users can select and update the layout without creating many files with the same code over and over.
It would ...
0
votes
0
answers
19
views
Use layout XML to conditionally hide UI element based on state of a UI model
I've added a new field UI component to an existing form, using layout XML, but I'd like that new field to be visible only under certain conditions.
In my module's layout XML I can manually switch that ...
0
votes
0
answers
20
views
Change background color of magento theme
I'm arranging the product sheets of an eCommerce made with OpenMage and JAKESHARP WATERLEE theme.
I need to change the background color of the theme, but if I go to JAKESHARP WATERLEE -> Theme ...
1
vote
0
answers
22
views
Magento2.4 auto ceate layout xml file
In the Magento2.4 community website, I need to define a CMS page layout every time I do a lot of active pages. Is there a way to automatically create an XML layout file based on the URL of my site, so ...
1
vote
1
answer
49
views
Custom design layout update not showing for CMS page
I've create a xml named cms_page_view_selectable_eco_test.xml at app/design/VendorName/themeName/Magento_Cms/layout/, so the full path is /app/design/VendorName/themeName/Magento_Cms/layout/...
0
votes
0
answers
6
views
Removal of updated layout
Magento 2.4.3.
I had updated layout of product and category pages by inserting widget (recently visited items) to pages' bottom above footer. Later on, I decided to remove that widget. What's strange ...
0
votes
0
answers
12
views
Why does Magento docs show manipulating layout though plugin rather than module layout XML file
The docs https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout_new_field.html they describe adding a new field to the checkout form. The first step is to get the field onto the form and ...
0
votes
0
answers
15
views
Different category page changes for 1 column and 2 column pages
I have a site that uses 1 column and 2 column layouts for category pages (some pages are 1 column, others are 2 column)
I made a change to the catalog_category_view.xml to update the layout of the 1 ...
0
votes
1
answer
151
views
Magento2 : Call phtml file to other phtml file
I want to add new phtml file to existed phtml file. It is working fine, but I want to know reference block and class names.
My code in layout file
<page xmlns:xsi="http://www.w3.org/2001/...
1
vote
1
answer
113
views
Disable specific Block is getting cached in Magento2
I am trying to disable cache for specific block,
Have used below code.
app\code\Vendor\Module\view\frontend\layout\default.xml
<referenceContainer name="header.panel">
...
0
votes
1
answer
47
views
Magento 2 - Category url load very slow
I have a very strange problem in frontend when open a category after in the adminhtml change the Design Layout to 1 column. If the category have the Design Layout 2 columns-left for example everything ...
2
votes
1
answer
155
views
Magento 2 - Load values in di.xml from a helper class
Currently the template is defined like this:
Company/PdfDesign/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2
answers
26
views
Magneto 2: referencecontainer and container
I want to know the difference between <container> and <referenceContainer> for layout file.
Thank you in advance!
0
votes
0
answers
21
views
Magento2 Set the product details page layout website vice
Magento2 How can we set the product details page layout website vice.
Like I have 2 websites I have different designs for both the website frontend.
How can I set different layouts for each site?
0
votes
1
answer
66
views
Layout load before event isn't triggered
I have an event
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/...
0
votes
0
answers
17
views
How to move product short description in category to before add to cart button
i´ve been trying to move short description in products list in category to before add to cart button. Nothing has worked so far. Created catalog_category_view file in child theme/Magento_Catalog/...
0
votes
0
answers
25
views
javascript to external js in magento2
I am having javascript code in my phtml file, but I want to do it from layout and create separate phtml file pass variable from require js. Can anyone tell me how to do this?
My phtml file code is
...
0
votes
2
answers
29
views
Check current language in XML
The website has multiple store views.
By default, the form is shown in the footer.
I need to place it under the header, but only for one store view.
Is there any way to move it there via XML?
0
votes
1
answer
59
views
can I use ```<svg> <path></svg> </path>``` instead of logo picture in magento2?
I'm trying to find a way that I want to use <svg> <path>content</svg> </path> instead of logo picture
0
votes
0
answers
21
views
Adding Style Into LayoutProcessor
I am using Magento2.3.5-p2
I have added a LayoutProcessor code as below
// 1- shipping address
$jsLayoutResult['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['...
0
votes
0
answers
40
views
Magento 2.4 Change page content based on query string
I want to show custom text on category pages based on query string on category pages.
for example : for category shirt with urls like
category/shirts.html?color=red
category/shirts.html?color=blue
...
0
votes
0
answers
66
views
Layout update for multiple cms pages using custom handle
I want to make some adjustments to most of the custom created cms pages with some exceptions however.
To achieve this I added a block and removed another block from cms_page_view.xml
I want to revert ...
0
votes
0
answers
147
views
Magento 2 : Rearrange Block Argument Items Using ReferenceBlock
I'm using magento 2.4 and trying to customize the items ordered table in admin order detail page via MyVendor\MyModule\view\adminhtml\layout\sales_order_view.xml. Here, if I reference the block to add ...
0
votes
0
answers
19
views
Magento 2.4.3 All Category Page Layout Not Change 2columns-left to 1column
Note : Fresh Magento 2.4.3 With Sample Data
I want to change All category page layout to 2columns-left to 1column
app/design/frontend/Magento/magento_child/Magento_Catalog/layout/catalog_category_view....