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
1
vote
1answer
72 views

XML has extra content

for a plugin we generate an XML output which works on several systems without a problem. One system though adds extra content. In the related controller we do have the following lines: $this->...
1
vote
3answers
2k views

hide cms block on checkout page if customer logged in

I want to hide my CMS block if customer is logged in. This is how my block is added to OPC page via local.xml file. <opc_index_index> <reference name="content"> <block type=...
1
vote
2answers
307 views

Magento LayoutXML Update Default Products per Page Grid

I cannot edit my magento theme for now - I'm trying to do this through the back admin. I am also by no means an expert, so please forgive me. I need one category to have a default grid value of 48 ...
1
vote
1answer
87 views

remove header part from some .phtml pages [closed]

visit these links : http://4.videomergerapp.com/ we removed the complete header part [except logo ] in the following page : http://4.videomergerapp.com/marketplace/ I want to hide complete header ...
1
vote
1answer
1k views

How to Change the position of breadcrumbs in list page?

I want to display the breadcrumbs in list page alone to display inside the grid exactly just above the toolbar. So I entered this line of code: <?php echo $this->getChildHtml('breadcrumbs') ?&...
1
vote
1answer
727 views

How to create different page layouts for a theme

Consider I have a custom theme called MyTheme1 in default design package. I want to create different page layouts ( like 1column, 2column, 3column ) for this specific theme. So if theme selected by ...
1
vote
2answers
1k views

XML block Layout

I am trying to show newsletter block in the footer, except for the Homepage where I want to show it only in content area. I used local.xml to move newsletter from left to footer: <reference name="...
1
vote
1answer
2k views

Magento 2: How to override Product View Attributes block?

How to override Product View Attributes block: vendor/magento/module-catalog/Block/Product/View/Attributes.php in Magento 2? Jsp/Attributes/etc/module.xml <?xml version="1.0"?> <config ...
1
vote
1answer
418 views

Magento 2.1: How to reference/replace template of an existing child block/alias?

I am trying to change de default product stock availability text to my own by using a custom phtml file. I want to overwrite "module-catalog/view/frontend/templates/product/view/type/default.phtml" ...
1
vote
3answers
3k views

Magento disable cache for price block

In my project we are using Magento Enterprise Edition 1.14.1. The prices in store are changed dynamically direct from Database. So the problem is Magento cache every thing (full page cache) so the ...
1
vote
1answer
1k views

How to change SEO page title in Magento 2

How do can you change the page <title> used within the <head> tag in Magento 2 with LayoutXML? In Magento 1 you could use: <reference name="head"> <action method="setTitle"&...
1
vote
2answers
1k views

Magento 2: How to move breadcrumbs and sku before product title?

I am trying to move breadcrumb and SKU to show above the product title using xml. Like <move element="breadcrumbs" destination="product.info.main" before="page.title.wrapper" /> But ...
1
vote
1answer
534 views

Add link to customer menu after another

I followed these two guides: one, two but I can't add my link at the end of the others, and maybe it's because there's an extension that put their own. I don't know how Magento construct the layout ...
1
vote
1answer
327 views

Help with adding script codes between <head></head> in success.phtml

Hope someone can help me with this. It's very easy to do I bet, I'm just not used to magento yet. I'm adding Google Ads to my magento (1.9).. I need to add this script code: <!-- Event snippet ...
1
vote
1answer
2k views

Moving topnav to sidebar in magento 2

I'm extending the Magento Blank theme and I'd like to move the catalogs main navigation to the sidebar (it should be displayed vertically instead of horizontally) I simply removed the original top ...
1
vote
0answers
552 views

Error in layout.js, cart not loading

I've got a problem with Magento 2.0.6. layout.js:64 Uncaught TypeError: Constr is not a constructor (layout.js line 64) The cart is not loading anymore, the minicart-wrapper stays empty. Problem ...
1
vote
1answer
1k views

Change header on another page

I would like to change my header when I went to another page, but I am not able to put my html file. I searched before coming here to ask, I tried this way, but just remove the header, I can not add ...
1
vote
1answer
2k views

Check if block rendered and displayed on the current page

Is there any way I can check if a block is displayed on the current page? I have a block my.banner with simple image. This block is added to the left sidebar on many different types of pages, e.g. on ...
1
vote
1answer
473 views

How can I include JS/CSS files only on pages which have my widget?

I'm creating a custom widget of a form element which requires some CSS and Javascript. I plan on injecting the CSS and Javascript files into the <head> section of any pages which uses that ...
1
vote
2answers
4k 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&...
1
vote
2answers
3k views

Magento 2: Short Description label shown as “none” on product page

For some reason the label of the short description is shown as "none" in frontend's product page just before the short description.
0
votes
2answers
4k views

Layout problems with extension when new theme installed

I've made an extension that requires some dynamically set .js and .css files. Using the default theme I added them in through a template set in a block in the head like this: in ...\app\design\...
0
votes
1answer
39 views

Magento 2 : How to set different list.phtml for each category

I want to do like this list.phtml should be different different call in category page. I created custom category layout and assign phtml file for that. But, layered navigation at bottom after product ...
0
votes
1answer
252 views

Magento2: How to put logo in other location

I want to put logo here: [![enter image description here][1]][1] Here is code header: <?php $welcomeMessage = $block->getWelcome(); ?> <div class="header-container header-style-20">...
0
votes
2answers
2k views

RWD Theme Category View Layout

In RWD I have a 3 column layout for category pages - I want the category 'banner image' and title to show above the columns below - sitting below the breadcrumbs. How can I go about this? Here's an ...
0
votes
1answer
4k views

include css in magento2 for custom theme

I am trying to include custom css and js in custom theme and should come on all pages. I have tried this from the Magento DevDocs, but I can't make it right and it's not showing. Please help me.
0
votes
0answers
28 views

Block is not getting called in custom module - Magento 2.3

I created a custom module to list all categories in a custom page. But the associated block is not getting called in the layout file. I can see the controller function is getting executed and page ...
0
votes
1answer
34 views

Move custom product in More Information Tab

I want to move product attributes inside the more Information tab. Can someone help?
0
votes
1answer
1k views

How to change the label of region_id field in checkout form [closed]

I need to change the label for region_id element in checkout page. For that, I have copied checkout_index_index.xml to my own theme folder and then change this: <item name="region_id" xsi:type="...
0
votes
1answer
373 views

Magento 2.3.4 custom layout update - insert different facebook OG on each page

I need to have a different Facebook OG:IMAGE for each CMS PAGE. I found on official documentation how to add a custom layout update on Magento 2.3.4 --> I've already created this file ...
0
votes
0answers
145 views

Magento2 top header section change layout

Currently in my site display this I need search section move to top as look wise below If anyone idea reply me how to search section move in magento2
0
votes
3answers
2k views

M2 Change layout of category page with XML

I have created a page http://www.extenderstore.com.au/shipping.html and I would like to change the layout to 2 columns with left bar. I made a file in Magento_Catalog/layout/ called ...
0
votes
1answer
410 views

Custom phtml cannot access $block

Im trying to add a custom .phtml file via XML to the product_view. This is what I have done: In the catalog_product_view.xml: <block class="Magento\Framework\View\Element\Template" name="ku....
0
votes
2answers
104 views

How do I add a new template in magento?

What I am trying to do is to create a new template in my theme. I created a file in frontend/mytheme/default/template/page/2columns-left-cms.phtml. This is the content of it : <!DOCTYPE html> &...
0
votes
1answer
992 views

How to make related/up sell products display full width of screen?

In product page, product details tab appear below the images gallery along the full width of screen. Related products appear below the details tabs. If details are moved to the right column (below ...
0
votes
1answer
193 views

review form not showing - update: it was ebizmarts magemonkey!

This one is puzzling me - the review form is simply not showing on the review page The reviews themselves are showing fine - but no form. I have a theme set up but all the theme has is a local.xml, ...
0
votes
1answer
439 views

Magento2: how to add remove header links conditionally

how to add remove header links conditionally. I am trying to show my account link only when the customer is logged in. Otherwise it should be hidden. How to do the same using xml files.
0
votes
2answers
185 views

Load Custom Template file with argument as product id or sku in magento2

I have created a custom module and calling that template file from the CMS page as like below. {{block class="Vendor\Module\Block\Custom" template="Vendor_Module::custom.phtml"}} In templates/...
0
votes
1answer
5k views

Calling a custom phtml file in another phtml file, cms block, cms page, and XML layout in Magento 2

There may be situation when you are developing a Project, you may need to call a custome phtml file in another phtml file cms page cms block (static block) xml layout How to do it ?
0
votes
2answers
1k views

Create a new referenceContainer for specific CMS page in Magento 2

How would you create a new referenceContainer in Magento 2 on home page only?
0
votes
1answer
4k views

Magento Custom Product Page Design and Custom Options

I'm working on a turning some static HTML into a Magento template / theme, but I'm having some problems figuring out the best way to do things in Magento. The product page design we have is quite ...
0
votes
2answers
328 views

How to rename the product detail tab title, and display as the last tab?

How to rename the product detail tab title, and display as the last tab? This is what i added, but didn't make any effect. the file is at the following location: /app/design/frontend/Infortis/...
0
votes
1answer
548 views

Setting a template for all actions of a controller using local.xml

I have created a custom module create/routing, with a controller RoutingController.php which has several actions index, upload, instagram and I would like to update the template for all of these ...
0
votes
2answers
1k views

How to override magento theme layout file

I am a newbie to Magento 2.2.4 and i want to get bootstrap 4 css and my own js files.. As a first step trying to override the theme layout file. I created a theme and enabled it successfully. (All js ...
0
votes
2answers
609 views

how do i include a static block in the footer only on homepage

This is my xml <cms_index_index> <reference name="content"> <block type="cms/block" name="block_video"> <action method="setBlockId"><...
0
votes
4answers
590 views

Cannot overwrite product list template in catalog_category_view

I am trying to overwrite this template from a custom module but nothing at all is working. I've tried arguments to set the template... I've messed with sequence. Below is the code in Vendor/Module/...
0
votes
1answer
583 views

is there a way to debug and know whether my layout.xml file is called or not (or) rather is the problem is in my template?

My controller works fine but when i am including layout (i.e loadLayout and renderLayout()) magento displays a blank page with default layout Is there a way to know which all Layout.xml file's have ...
0
votes
3answers
369 views

Magento 1.x - Custom JS/CSS not found

I added these custom js and css file: skin/frontend/base/default/black/NewsletterPopup/js/main.js skin/frontend/base/default/black/NewsletterPopup/css/main.js Then I included them via my modules ...
-1
votes
3answers
98 views

Magento 1.8 - How to use reference to show a template on all pages without using a custom module?

I try to add the following template on all pages in the header by using reference. I tried it like this: app/design/frontend/venedor/default/template/black/alert/index.phtml: <script>alert("...

1 2 3 4 5
6