Questions tagged [cms-block]

Denotes questions related to CMS blocks.

Filter by
Sorted by
Tagged with
1
vote
1answer
15 views

Magento 2 graphql get the cms block based on store

I am trying to get the cms block based on store, but it is alway returning the default store block content. The query I used : { cmsBlocks(identifiers: "login-data") { items { identifier ...
1
vote
1answer
2k views

How to add a CMS Block via XML layout update in Magento 2?

In order to create custom sidebar menus for my CMS pages in Magento 1, I used to be able to create a static block, and then use a widget to place it on all CMS pages that had a 2 column layout with ...
0
votes
2answers
44 views

Show parent categories on a page

I am a beginner in Magento. This may be a simple question. I have a header menu 'shop'. This link should redirect to a page that shows all parent categories. How can I do this? any help is really ...
0
votes
1answer
33 views

magento 2.2.3 how to add a new cms block or new phtml to product page

I want to add a new cms block or PHTML to the product page. I have the following files composer.json, etc/module.xml, and registration.php I have view/frontend/layout/catalog_product_view.xml &...
3
votes
1answer
643 views

Programmatically create static block and add it to selected store views

I need to create static blocks programmatically. How to assign a block to selected store views? I've found tutorials about creating static blocks, but they all add the block to all store views, like ...
1
vote
4answers
2k views

File validation failed. Upload Images magento 2

Getting an error File validation failed. when trying to upload JPG format images from cms block in Magento 2.3 version. File Path : vendor/magento/module-cms/etc/di.xml <argument name="...
1
vote
2answers
54 views

How to make the Video Autoplay in cms block? Magento 2.2

In Cms Block, I'm trying to add an embed Youtube video that would autoplay upon the page is loaded. However, the part that defines autoplay "?autoplay=1&loop=999999999999&playlist=_bkTXNozzzQ" ...
1
vote
2answers
28 views

Adding a block inside a block already in a container

I have a third-party module and I'm trying to inject a block of my own (a CMS block) between two of their blocks. I'm doing something wrong because I can get my block to appear at the very end or the ...
1
vote
0answers
249 views

How to add minicart in cms block magento 2

I tried adding this shortcode to my cms block {{block class="Magento\Checkout\Block\Cart\Sidebar" template="Magento_Checkout::cart/minicart.phtml"}} but it doesn't show the minicart dropdown when ...
1
vote
1answer
40 views

Set different static cms block to each different product

I have a created different CMS static blocks. I need to call the respective static block for each product. I thought of getting the URL key and then assign it to the respective Products. How could I ...
2
votes
3answers
112 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> ...
1
vote
1answer
681 views

Move cms static block before Breadcrumbs in Magento 2.2 category page

I want to move cms static block before breadcrumbs. My static block name ves_element_top.
1
vote
0answers
29 views

Magento 2 How to create Hero image module to CMS page [duplicate]

I have created the hero image module for the CMS page. But the image is not uploaded and there is issue to save the image too. Is there any solution for that? please suggest.
1
vote
1answer
265 views

Terms and conditions from Static block magento2

I need to show Terms and condition text before place order button of each payment method. Which file i need to override to show content from static block. As i checked terms and conditions text comes ...
0
votes
1answer
91 views

Magento 2.3: Using HTML in a Static Block

Can I use HTML content in a Static Box? If so, please provide the code that I can use in the Block Content to identify the code as HTML. I am trying to use a Widget to insert HTML content into the ...
0
votes
1answer
19 views

Using a Page vs. a Static Block

I'm trying to get a very basic understanding of when I should use a Page vs. Static Block to create content for the site. Can someone provide examples of where they might be used? Or scenarios where ...
2
votes
1answer
720 views

How to call cms block of block type into custom header

I've made code of most viewed products which I'm trying to call under custom header. This is what I've done so far. Posted the block code under cms block by name 'most_viewed'. {{block type="...
-1
votes
2answers
689 views

Need Help Finding Out the ID / Identifier for Banner Block So I Can Edit Them In CMS Block

Website is: www.HighCaliberLine.com Theme is: Ultimo There are 3 banner blocks on the website that I'm trying to edit through CMS block. The problem is I can't find the ID Block / Identifier for ...
0
votes
0answers
46 views

Magento 2 - Custom Variable | How to get the Plain Value as well as HTML value using directive {{CustomVar code=“CUSTOM_VAR_CODE”}} in CMS Blocks?

I have added the Custom Variable from Admin > System > Other settings > Custom Variables > Add New Variable, it is possible to add both the Variable HTML Value as well as Variable Plain Value as in ...
1
vote
2answers
785 views

Magento : How To Add an Attribute to Static Block

How to add attribute to static block. I am not looking for code, but also where put code. Assume attribute is named test and static block name sttest. I have search on this, but always get lost on ...
0
votes
0answers
86 views

Magento2 : How to call CMS page link in PWA

I have Created one CMS page and Added in Static block like below code : <ul> <li><a href="about">About</a></li> </ul> Called static block in venia-concept/src/...
0
votes
0answers
18 views
0
votes
1answer
22 views

Cannot open blocks, pages via Magento 2 admin

I have installed Magento 2.3 on xampp. I have tried to check the CMS pages, blocks via admin panel but its not opening instead it says the error Attention, Something went wrong How can I fix this ...
0
votes
1answer
55 views

Magento 2 : Face Error while create a custom block

I got the below error when create the Custom Block for the HTML sitemap. Error filtering template: Warning: Declaration of Vapor\Sitemap\Block\Sitemap\Category::_getHtml(Magento\Framework\Data\...
2
votes
2answers
88 views

Get content of CMS Block in Magento 1.x

i want get content in CMS Block, i tryed this code but it not show content My code : <?php foreach ($this->getAgreements() as $_a): ?> <?php echo $_a->getContent() ?> <?...
0
votes
2answers
975 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.
0
votes
1answer
68 views

Magento 2 include template with form in CMS Block

I have been struggling trying to put a template functionally working inside a CMS Block. When I put this code inside my CMS block the template is correctly implemented {{block class="Experius\...
13
votes
3answers
10k 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 ...
0
votes
1answer
30 views

How to display custom cms block on cms homepage when Full page caching is enabled

pleas help me with my problem. I try to display cms block on cms homepage via widget. It works only when i have full page caching disabled. Is there a way to display this block with FPC enabled? Any ...
2
votes
1answer
52 views

Remove banner.data block by layout file

I need to remove the block from layout file using below code, <referenceBlock name="banner.data" remove="true" /> Because there is no way to disable Magento banners in admin, however, this can ...
0
votes
2answers
44 views

Add arguments in CMS Block

The project is using the Bluefoot plugin to add the block in cms_index_home. I created a static block in Magento Admin with the follow content: {{block class="ProductsRegulars\Block\Recommendation\...
0
votes
2answers
718 views

Add CMS Block to product view and category page

What is the best way of adding a CMS Block under the breadcrumb on a product listing page and a different one on a product view page. Magento 1.9.
0
votes
2answers
3k 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 ...
2
votes
3answers
2k views

Insert Current Date as Widget or Variable in Magento CMS

Is there a way to insert the current data in Magento CMS as variable, widget, or any other method aside from including a .phtml file with php echo of date().? Right now what I did is include a .phtml ...
1
vote
3answers
2k views

Magento 2 : Call Static block wysiwyg images not using editor

Any one have idea for how to call images in Static block not using editor like {{media url="wysiwyg/demo.jpg"}}?
2
votes
1answer
380 views

Saving cms blocks after 2.3.1 upgrade now display the html on frontend

After the 2.3.1 upgrade, which included/enabled Page Builder, a custom section we have that loads block content and displays it now escapes the html tags so it outputs all of the html visible on the ...
0
votes
1answer
60 views

Add css to a block Magento 1

In Magento 2, there is a box to place custom CSS to any block. However, I don't see that as an option in Magento 1 How do I add custom CSS to a block in Magento 1? Edit for possible dupe: I want ...
1
vote
1answer
33 views

how to move the custom block middle of the page in Magento 2

I added custom block in home page Magento 2, but it's showing in the top of the page I want to move to after banners how can I achieve this? cms_index_index.xml <?xml version="1.0"?> &...
0
votes
1answer
35 views

CMS statsic blocks doesn't show for Ar store language - Magento 2?

i have a multi language Magento2 Store and i have CMS static blocks in home page , so to translate these blocks i had to duplicate each block and change store view to En or Ar for each block to show ...
0
votes
0answers
25 views

Update CMS block via migration script

How can I change the footer logo via migration script? PNG file is located in wysiwig/logo.png under pub folder. It is called out in cms block in the admin panel. I could add my logo to that ...
1
vote
0answers
167 views

Magento 2 : Create cms block store vise with same identifier

I want to create CMS block with same identifier. For ex. Testing is my identifier. But, content of testing is different in German store view and Russia store view. How to create store vise CMS block ...
7
votes
3answers
5k 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 ...
3
votes
1answer
184 views

Magento 2.3.0 TinyMCE removes anchor tag href suffix when used with {{store url=''}}

I am trying to add category link in the CMS block. <ul class="list-unstyled"> <li><a href="{{store url=''}}test-collection.html">Test Collection</a></li> </ul> ...
1
vote
0answers
19 views

Backend listing grid view page not opening order listing cms page & block listing etc

Backend listing grid view page not opening order listing cms page & block listing etc.. Admin panel not able to load multiselect.html, text.html, html.html, actions.html and js file as per console ...
1
vote
0answers
17 views

cms pages and block is not loading in backend

CMS pages and blocks won't load in the backend. It keeps loading and loading without not showing any pages or blocks. I reindex, compile, clear cache... But nothing changed. Any help would be much ...
1
vote
2answers
154 views

How to change footer and header for a CMS page only using layout XML?

I want to change out the footer and header for a minimized version but only on a certain CMS Page. Is it possible to do this with the layout XML input field to remove the header/footer and add static ...
0
votes
0answers
81 views

Defer images in CMS blocks Magento 1.9.3

I am trying to speed up my page to get the best result on google but it is showing defer images. I have deferred the images on the pages but lazy loading is not working for any of the images in the ...
0
votes
0answers
241 views

Magento 2 CMS Block: Is it possible to use another directive within translate directive?

For example I have a CMS block with a text I want to translate but I have a link inside this text that uses the {{store url=""}} directive. In my cms block: {{trans "Foo <a href="{{store url=""}}"...
8
votes
2answers
237 views

store_url does not render link correctly

I am using this link in my static CMS block <a href="{{store_url='produkte/insektenschutz/fenster/spannrahmen.html'}}"> but it renders as https://www.mysite.de/produkte/insektenschutz/fenster/ ...
1
vote
1answer
567 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 ...