Questions tagged [cms-block]

Denotes questions related to CMS blocks.

Filter by
Sorted by
Tagged with
13
votes
3answers
13k views

How to add a CMS block programmatically in Magento 2?

I need to add a CMS block via an install/upgrade script. I've already figured out how to add "normal" CMS pages as seen in the script below. But since I can't find any way to add CMS blocks in Magento ...
14
votes
3answers
46k views

Magento2 - How to show a block content on homepage

How to show a block content on homepage? After install magento2 without sample data, I chose 'Magento Luma' theme and add 'Home Page Block' block and copy the code from the sample store. but nothing ...
4
votes
2answers
16k views

Magento2 contact form in CMS page

in magento 1.x for add contact form in CMS page i use next code {{block type="core/template" name="contactForm" form_action="{{store direct_url='contacts'}}/index/post" template="contacts/form.phtml"}...
36
votes
6answers
60k views

Add a static image on PHTML page and CMS Blocks : Magento2

How I can Add a static image on PHTML page and CMS Blocks into Magento2? in Magento 1.x it was possible using $this->getSkinUrl('images/xyz.jpg') I am trying following method into Magento2 In ...
6
votes
6answers
37k views

Magento contact form in CMS page

I'm new in magento and I wonder how to create a form in a CMS page and receive the information by email. I did some research on the internet but I did not find explicit answers.
15
votes
4answers
4k views

CMS block caching issue in EE 1.14.2

I have an issue that seems to be related to the caching of CMS static blocks. I have a cms page and within that page I am rendering a number of cms static blocks. A simplified version of the CMS ...
7
votes
3answers
6k views

Cookie Restriction Mode Translation

With latest release, CE 1.8.1 cookie_restriction_notice_block went to before_body_end in layout (/app/design/frontend/base/default/layout/page.xml). But users don’t realize about that notice nor that ...
0
votes
2answers
1k views

Get product list by ids in CMS page [ Magento 2 ]

I want to create cms page and will show products list as per given ids in admin editor.
1
vote
2answers
3k views

The use of “function setData ()” in the blocks on CMS pages

I can not understand why variable transmission does not work, when the block is called, the display categories on the home page. in the template file I pass a variable to a different template file ...
6
votes
1answer
6k views

Magento 2 - How to add or insert PDF file in a CMS page?

Do you have an idea on how to add or insert a PDF file in a CMS page or CMS block in Magento 2? Correct me if I'm wrong for the question title for this thread.
7
votes
1answer
10k views

Magento2 images in CMS block [duplicate]

I have an image in: /var/www/html/app/design/frontend/Alothemes/milano/web/images/natale/IMG_7300.JPG How can I refer to this image in CMS block? I know I should use: <img src="{{media url="..."}...
4
votes
1answer
4k views

Magento 2 Load - Block (CMS Static Block in Magento 1 terms)

I am attempting to load a static block from my controller - but am having trouble locating the right syntax for doing this. What is the proper syntax to load a CMS block by identifier or block id and ...
5
votes
1answer
3k views

Magento 1.8 static block in widget not showing?

I have created simple static block and trying to show it through widget inside Left Column but its not showing. In fact any static block is not working through widget. I have created magento theme in ...
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 ...
2
votes
3answers
389 views

WYSIWYG editor inserting &quot; instead of correct " in 2.3.0 when we use any anchor tags

I am facing an issue with Magento 2.3.0+ WYSIWYG editor inserting " instead of correct " and also when we write like <a href="{{store_url}}sales/guest/form/">Orders and Returns</a> ...
6
votes
1answer
3k views

Magento 2: Get WYSIWYG editor's data in frontend?

I add wysiwyng editor in admin Ui form. <field name="content"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="...
2
votes
1answer
1k views

Added block to whitelist, but blocks still not showing (6788)

I also have a problem with custom blocks on my home page CMS after 6788. The CMS page uses a slider, which is on the backwards incompatible list because of the old router config. I used supee-6788-...
1
vote
1answer
577 views

Mulitple store: Same CMS and static pages but loads different content for different stores

Multiple stores (version 1.9): I can add category description individually for each store and it will display individually for specific stores. Requirement: I want same functionality for CMS and ...
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=...
0
votes
1answer
1k views

How can I create static blocks via a module install script?

I have a number of static blocks which I would like to add to my Magento 2 store via a module install script. I have seen an example here: http://www.learnmagento.com/magento-2-create-cms-static-...
0
votes
1answer
375 views

Set Block Status from xml and show if its enabled

Created CMS > Block and display it on product page as tabs following this tutorial app/design/frontend/[theme]/default/layout/catalog.xml <block type="catalog/product_view_attributes" name="...
0
votes
1answer
109 views

Adding Jquery to block (Still a nooblet)

I've created a CMS block with basic HTML, but I want to add my own custom Jquery. I've been working on a timer project, I've done my own timer and the HTML and the styling are all prepared. But the ...
0
votes
2answers
4k views

Edit the default Magento2 cookie message

I would like to change the text and button value of the Mage2's default cookie policy popup. See how it looks now: https://imgur.com/a/qvqAGXb I would like it to read some different text and have a ...
0
votes
0answers
134 views

Magento 2 : Separate cms pages with different left side bar

I want to create pages for shipping return , faqs and two others like this . But how can I add left bar to them like this ?