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
1answer
9 views

ios Safari - Click on level 0 category menu would cause the background page shifted up unexpectedly

I found an issue that occurs with iphone and iMac using Safari, running on Magento v2.3.1 Steps to reproduce the problem: 1. Visit webpage with iPhone/iMac with Safari browser 2. Tap on Responsive ...
0
votes
0answers
3 views

Edit checkout labels and put a dropdown city instead of text field and Shipping method auth select

I having many issues with magento2. I'm benginner using it. What i want: Get the "City" in Checkout as a dropdown with custom list (its like 10 items in the list) instead of a plain text field. Edit ...
0
votes
0answers
21 views

How to wrap header.links block in a custom div via layout XML?

I have a top menu which is generated by header.links block as <ul class="header links"> <li>...</li> ... </ul> I want to wrap this header.links block in another div as: &...
0
votes
1answer
25 views

Load custom css in IE issue in magento2

I need to use custom css in IE. Added below code to default_head_blocks.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
1answer
20 views

restore the default checkout in magento 2.3 [duplicate]

I have a disaster in the template of a checkout, it is really bad!. I never used Magento but now I need to restore the default checkout layout/html/template of a web. I no have backups of changes and ...
0
votes
1answer
26 views

How to restore the default checkout template?

I never use Magento but, a friend uses it and a dev. broke their checkout page, how I can restore the TEMPLATE of the checkout to default? I don't see a backup of any of the files, and I no have clue ...
0
votes
2answers
28 views

Getting 500 error when access product page magento 2

when i add a product to muy category this what i found as results any help please and thanks in advance
1
vote
2answers
50 views
+50

Magento2 Need to filter grid when value is entered in search box, the column of the data is from another table

I have added 4 columns in the grid as displayed in below screenshot. For displaying for eg. Recipient Email column I added following code in XML & it's renderer PHP file. (Code is added below) ...
0
votes
1answer
28 views

Magento 2 Layout update xml not working for categories

I try to use my customized .phtml file for a certain category. I go in Admin->Catalog->Categories->Design->Layout update xml I put the following code in the field layout update xml, &...
0
votes
0answers
13 views

how to add a an html and css files to existing theme?

I am trying to add a custom HTML, CSS, and JS files to an existing theme or at least grab the menu from the Magento site to the static page. Thank you
2
votes
0answers
17 views

Production mode doesnt load any content for custom module

I have created a custom module in Magento 2. In developer mode it is working well, however same module does not show any content in the production mode of Magento its show only white screen. There is ...
0
votes
0answers
21 views

controller not reaching magento2

One strange thing is happing in my application, I have one custom link in my email. On development server everything works fine, but on production server when I clicked the link nothing happens, ...
0
votes
1answer
22 views

Magento 2 What is the different between setDefaultOrder and SetSortBy in layout xml?

I'm trying to set a default sort order to products listing in category page. I have seen people suggest using <action method="setDefaultOrder"> <argument name="...
1
vote
2answers
27 views

How to add block html content display in particular div or any particular place by xml file?

I created customer_account_login.xml to add block. <?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
0
votes
0answers
6 views

Magento 2 Custom checkout step form not showing dropdown options

I have added a custom step in checkout. I have a form on my custom step that has a select field and a checkbox. I need the select field to display options from a custom table. Here's the code for ...
0
votes
1answer
25 views

Magento 2 - Full width for a section in product view page

I add a new block in Product View page: <referenceContainer name="content"> <container name="containertwo" as="containertwo" label="ontainer" htmlTag="container" htmlClass="my-...
1
vote
0answers
33 views

Magento 2 - Passing argument from backoffice in Category Layout Update XML to module

In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office Category > Custom Design tab > XML Design Update <reference name="product_list"> &...
2
votes
1answer
25 views

Remove container in block class

I want to remove some items from a page when certain conditions apply. I got a solution but I'm wondering if there isn't any better way to do this. Now the code that I have is for each block that I ...
1
vote
2answers
34 views

Magento 2 - OWL Carousel 2 in related products issue

I try to setup OWL Carousel for Related Products in Magento 2. I overwrite this file: Magento_Catalog/templates/product/list/items.phtml this is my custom code: <div id="owlslider" ...
0
votes
0answers
12 views

magento2: add an image to customer_account.xml layout

Hi I'm trying to modify an existing layout from a module created by someone else. I want to and an image to a link. The body code looks like this. I tried adding tag and also an tag next in one of ...
0
votes
1answer
15 views

Magento 2 - Get all team members on a page

I begin in Magento development and I try to do something but I don't know how to start. I want to display on a "about us" company page all team members of a company, for example in WordPress we have ...
0
votes
0answers
18 views

Magento 2.3 - Append custom block to product listing using DI xml failed

I am trying to add my custom block using DI XML but it failed. Di XML <type name="Magento\Catalog\Block\Product\ListProduct"> <arguments> <argument name="data" xsi:...
2
votes
1answer
40 views

Magento 2 Migration Settings error

I migrate settings from Magento 1.9.3.10 to Magento 2.3, after the migration was successful when I try to reindex or flush de cache from command line I have this error: The website with id 0 that ...
1
vote
4answers
45 views

Magento2.3.1 i want to remove wishlist link from top.links but not working

I have added below code in my custom Magento_Theme default.xml file to remove top.links <referenceBlock name="top.links"> <referenceBlock name="register-link" remove="true"/> ...
0
votes
1answer
28 views

Layout XML Error - Magento 2

I change the deploy mode to developer on Magento 2 and now I see the following error: 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': This element is ...
0
votes
1answer
12 views

Extend/Override Javascript Included from Layout (head->link)

I want to extend: vendor/magento/module-catalog/view/adminhtml/web/js/edit-tree.js Which is loaded by layout: vendor/magento/module-catalog/view/adminhtml/layout/catalog_category_edit.xml:12 Why I ...
0
votes
1answer
28 views

Access specified product on custom URL

Greetings StackExchange. I' have a task where I cannot google anything on the subject. I want to create a copy of the standard Magento product view but it should be accessible on a custom URL. I ...
0
votes
1answer
31 views

Magento2.2.5 remove default product title and add custom phtml file on product detail page

in Magento2.2.5 I want to remove the product name and instead where it is load a custom phtml file that will call in a custom product attribute However my phtml file is not being called in here is ...
0
votes
0answers
30 views

Moving language block in footer not getting after reference block in magento2

I want move header language block into footer after copyright but it's display before copyright block i have tried using <move destination="footer-container" element="store_language" after="...
1
vote
1answer
20 views

Magento2 Luma move category image so its full width

In my magento 2.2 based site I am trying to edit the catalog_category_view.xml to move the category image above the page-main div and after the breadcrumbs so that it will load full width (in the Luma ...
3
votes
0answers
24 views

How to organize layouts?

I'm on the product page and in my layout i created a block to render on the product informations, on the upsell product informations and on the related product informations but it doesn't works. The ...
2
votes
2answers
65 views

Magento 2: I need to change template for different categories

I need to change the template for subcategories(like able to assign any category) and list.phtml is fine. But need to change template for random categories. Any one have solution for this?
0
votes
1answer
35 views

How to override catalog_product_view.xml?

I want to have a different theme on special products. So I have a main theme --> app/design/frontend/Main/Default and I want a different theme, which is child of my main: -- app/design/frontend/...
0
votes
2answers
67 views

Possible way to fix luma Layout

Encounter this issue (Layout are wrong ).What is the possible issue for this? Tried dicompile, clear cache and reindex.Still not working exception.log main.CRITICAL: Path "/var/www/html/var/...
0
votes
0answers
22 views

Overwrite block layout inside text_list (content) blocks

I re-developed the whole category page in a layout.xml file included in my custom module, trying to reuse the block names. I needed to change many block (type) classes. I had read that by redefining ...
5
votes
1answer
34 views

Set custom tab in customer edit page Active

I created a custom tab for customer edit page in backend like this: app/code/Namespace/Module/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
0answers
28 views

Overriding template not working in dev branch

I have overridden a file vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/address/edit.phtml and placed the replaced file in: app/design/frontend/ParentTheme/...
0
votes
1answer
17 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 ...
3
votes
1answer
26 views

SOLVED Createblock definition in magento 2

i search around a lot about references of this function. but the documentation have a big lack. does somebody explain me this part of code (deeply) ? $this->getLayout()->createBlock(...
1
vote
2answers
38 views

How to remove base url from layout argument

I am using layout argument in path but it display with base url like <block class="Magento\Framework\View\Element\Html\Link" name="search-mini-text"> <arguments> ...
0
votes
0answers
16 views

Change mobile navigation

I am trying to work out which xml file controls the menu on luma for mobile so that I can remove the Menu/Account section here at the top So I can achieve something similar to this
0
votes
0answers
29 views

Contact form in CMS page with form.additional.info

I'm trying to add the contact form to my CMS page. I can add {{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}} as indicated on this post ...
1
vote
1answer
30 views

Difference templates and layouts

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/debug-theme.html I am following the magento docs to create a theme for practicing, it shows me how to find these things but I would ...
0
votes
0answers
12 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
45 views

recently viewed product collection is empty in magento 2

I have added a code in Magento_Catalog/layout/catalog_product_view.xml <referenceBlock name="product.info.details"> <block class="Magento\Reports\Block\Product\Widget\Viewed" name="...
1
vote
2answers
46 views

Magento 2 how to remove “SKU field” via Layout Update XML?

I'm stuck on this: I need to remove the SKU field from product page only for few products, I'm sure that I can do it with "layout update XML" tab but all my attempts have failed.. any help? :)
2
votes
2answers
30 views

Magento 2: How to add a div in below navigation?

I am trying to get a div displayed directly below the navigation on a theme which extends Luma I have added the following into my Magento_Theme/layout/default.xml but cannot see any results. The ...
0
votes
1answer
28 views

How can i add block to existing layout in catalog_category_view.xml?

I want change layout of catalaog_category_view.xml but i can't. I override block category.products and it's work but how can i add my own block to existing category.products block? Because i want add ...
1
vote
1answer
32 views

How I can add custom block to layout using php in Magento 2

I have created a custom block, as I want to add this layout to my current layout. Following is my block: <referenceContainer name="sidebar.main"> <block class="Vendor\ModuleName\...
0
votes
1answer
38 views

Magento 2 : Exclude CSS from merged file just for the homepage

I have merge and minify CSS enabled and I would like to know if is there a way to exclude a specific CSS file from the final merged file, but only for the homepage? I know how to remove a CSS file ...