The Stack Overflow podcast is back! Listen to an interview with our new CEO.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
36
votes
6answers
41k views

Debugging layout XML loading

TL;DR: is there a way I can debug the loading of the layout? As I believe one module's layout is conflicting with another. Related to a previous question I made: How to make a module layout to be ...
14
votes
2answers
32k views

Adding custom layouts for CMS and Category use with custom module trouble

I have a category in my store that requires a totally different layout to the standard Magento layouts. So I created a new copy of the 1column.phtml and renamed it and made one small change to test. ...
5
votes
2answers
13k views

Magento 2 - Custom Page Layout

I wish to add a custom home page layout in Magento 2. In Magento 1, it's very simple, i create my module : <?xml version="1.0"?> <config> <modules> <Vendor_Custom>...
5
votes
1answer
3k views

Magento 2 - editing module structure and functions

in Magento 1.x you could duplicate the extensions to app/design/frontend/themeName/default/template/or/layout and then modify it's layout or functionality via xml or phtml files. How do we duplicate ...
5
votes
1answer
12k views

Magento 2: Creating a custom layout

I'm having trouble creating a custom layout. I have successfully created a layout called home_page.xml which is a copy of the default 1column layout. I have selected this layout for my home page, ...
8
votes
1answer
7k views

Add block to layout dynamically in event observer

I want to know how to use layout.xml with event observer. I want to show a message in footer when payment made successfully. I know I have to use the event ...
9
votes
4answers
53k views

Adding CSS and JS to <head> using a module layout.xml for block

Synopsis I would like to add a block to my grouped product view and my simple product view. This block will have some nice tooltips for hover states, i'm using a small library with one jquery plugin ...
2
votes
1answer
1k views

Relationship Between Module Layout Handle XML files and Theme Update XML Files

What's the relationship between a module's layout handle XML file and a theme's layout handle XML file? Which files have priority? When does one file replace another file? When does one file merge ...
2
votes
3answers
6k views

How to check whether a block exist ( based on its type )

This really confuses me !! I came to a situation, where I need to create a new block (core/template block) programmatically, if there is CMS Block present in a page layout. In general case, according ...
1
vote
3answers
12k views

Magento custom block shows Fatal error: Call to a member function setTemplate() on a non-object

I have created one block inside my custom module but it's not working. My module is working fine but my block is not working when I call my block from footer.phtml file it shows 'Fatal error: Call to ...
15
votes
5answers
11k views

Magento 2: How to set custom template for core block

I'm trying to override the register.phtml in my module, but it seems there are some config problem that make Magento unable to use my custom template to override the one in core module. I've checked ...
3
votes
2answers
7k views

Load Custom Admin Template

Developing a simple custom module, and the hardest part is getting the template to load in the admin. I'm sure I'm missing something simple (but important). The template will not load. I believe ...
3
votes
1answer
2k views

custom module layout not working

I've been fighting a while with a problem, but I can't find a solution. Here is the thing: Got a module that I need to show in the sidebar of catalog product view so this is my module.xml in default/...
3
votes
3answers
10k views

Admin layout file not loading in custom module

I'm trying to load in a block on one of my admin pages in a custom module, but it doesn't appear to be loading. At first I thought it was a handle issue, but I've found out that the handle is ...
2
votes
3answers
495 views

Magento2 - missing adminhtml custom block after upgrade to 2.2

We had a custom block injected in the adminhtml section. This block is managed in a module (let's call it Vendor/Module) & it was working fine in Magento 2.1.*, following this methodology magento ...
1
vote
2answers
3k views

Custom layout not loading for custom module

I have created a custom module. Below is my app/etc/modules/Php_CardReload.xml <?xml version="1.0"?> <config> <modules> <Php_CardReload> <version&...