Questions tagged [containers]

Denotes questions related to Magento 2 containers.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
421 views

In which referenceContainer of product page we add block for custom rich snippets of current product?

I have to extend default rich snippets for products. For this I have my script in .phtml file as: <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "Product", <...
2
votes
0answers
404 views

Magento2 : Page_layout Container And Widget Configuration

I'm new on Magento 2, I have created a custom theme and a custom page_layout in /app/design/frontend/[Vendor]/[ThemeDir]/Magento_Theme/page_layout/homepage.xml <referenceContainer name="page....
1
vote
0answers
123 views

Magento 2: How to move block into html div?

I want to move below block in third "col-md-4 col-lg-4" div:- <block class="Magento\Catalog\Block\Product\View" name="product.info" template="Magento_Catalog::product/view/form.phtml" after="alert....
1
vote
1answer
93 views

Conditionally removing a container

I am trying to replace the customer.login.container on the login page, which can be done through customer_account_login.xml by adding something like: <referenceContainer name="customer.login....
1
vote
1answer
563 views

Magento 2 : How to Remove Container Div From CMS Page

How to remove container block from cms page for particular layout. I have created new layout and apply on cms page but not able to customize it. Below my custom layout code: app/design/frontend/...
1
vote
2answers
2k views

Xml Element reference is not allowed here

I am new to Magento & I am using Magento version 2.1.7 in my Windows 8.1 system with Xampp while creating a new module I am getting an error in my XML file located in the app/code/vendor/module/...
1
vote
0answers
96 views

Magento 2 - setting a container class programatically

How can I retrieve a container from the layout programmatically and then set/update the htmlClass? I would like to be able to do something like the following: $container = $layout->getContainer('...
0
votes
0answers
13 views

Running a script inside a docker container using shell script from host

I am new to Docker technology,I am trying to create a shell script on my host to clear caches and to deploy my static content in Magento 2 inside my apach containe. to access to my apach container i ...
0
votes
0answers
17 views

Cant run ./provision.sh in my Linux container

When i try to run provision.sh Linux get error fatal: [lxc-server]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to remote host \"magento.lxc\". Make sure this host ...
0
votes
0answers
34 views

Reorganizing the header on the default.xml of Magento 2

I was using Magento 1.9 and now I'm migrating to Magento 2. I ready Magento devdocs for frontend and tried a lot of things but none works for me. Probably I forgot some details but I'm completely ...
0
votes
0answers
38 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 ...
0
votes
1answer
169 views

M2 | How to find referenceBlock name for the Sales Order View : Account Information Section?

Part1: I need to know the referenceBlock name for: Part 2: and put a button at: “If you have knowledge, let others light their candles in it.” ― Margaret Fuller
0
votes
3answers
106 views

Move block before Tab Magento2

i would like to create a banner on product view page and move this banner AFTER the short description and before the tab content. I user this code under catalog_product_view.xml <move element="...
0
votes
1answer
117 views

Magento2: Is it possible to get a reference to containers and programmatically add blocks to them?

$block = $this->getLayout() ->createBlock('Magento\Framework\View\Element\Template') ->setTemplate('MyModule_ProductTile::widget\test.phtml'); $this->getLayout()->...
0
votes
0answers
56 views

Find referenceContainer in Magento 2.1 module

This is my first attempt to write a Module for Magento 2.1 I have read the documentation for referenceContainer that is not very helpful, I would like to know how can I access and apply my change in ...
0
votes
1answer
111 views

Add container to custom page layout

I'm trying to add containers/blocks to a newly created page layout. However, they do not show up in the DOM at all: vendor/my/module/view/frontend/layouts.xml: <page_layouts xmlns:xsi="http://www....
0
votes
1answer
553 views

How to create new container inside <main> tag in magento 2?

I am working with magento 2 layout containers. I need to create a container inside and below <div class="columns"> . My HTML should be like below, <main id="maincontent" class="page-main"&...
0
votes
1answer
371 views

Admin page content not loading: latter doesn't exist

I'm running Magento 2.1.3, and am seeing empty page content in my custom module's admin page, with the error Broken reference: the '[layout element name]' element cannot be added as child to 'left', ...
0
votes
0answers
1k views

Magento 2 Add block to custom layout via admin panel widget

I've made a custom theme and custom homepage layout that renders a custom container and inside it a block with a custom template: custom_homepage.xml inside Magento_Theme/page_layout folder <?...