Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [cms-block]

Denotes questions related to CMS blocks.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Submitting a form on a CMS page that is loading a template file is returning a 404 error on the post request

I think I am running into a routing issue where my post request is not reaching my controller. Test/Example/view/frontend/templates/swatches.phtml <form action="<? echo $block->getUrl('...
Sammy Tang's user avatar
0 votes
0 answers
21 views

Magento 2.4 CMS Blocks dont show up on category pages

i cant get the cms block to show up on categories pages. the same cms block works fine on the homepage. the category page is set to display static block and product added the cms block. i do have a ...
roger's user avatar
  • 551
0 votes
0 answers
22 views

data-mage-init breaks in cms static blocks - how do i get tabs?

I need a block with tab content, so a client can edit categories when needed. I have been using mage-init but it breaks if you try to edit after the first save. It's these two lines below. Once edited ...
totneschap's user avatar
1 vote
2 answers
188 views

Load widgets in specific position on category list page - Magento2.4

We would like to create widgets with layout updates and load these widgets in a specific place on the category list page. So we would like to create a widget from admin, load a CMS static block and ...
JGeer's user avatar
  • 1,418
0 votes
1 answer
152 views

magento 2.4 add cms block to minicart

I'm using widgets to insert static blocks on different places in my magento website. It works everywhere except the minicart. When I create a widget with the layout minicart promotion block, what I ...
Lou Nik's user avatar
  • 443
2 votes
1 answer
105 views

how to display cms block from position on product page?

i already created cms block with image advertising how to display cms block on product page in the lower part above the footer? only use admin panel
Miron's user avatar
  • 79
0 votes
1 answer
48 views

Call phtml using block code

login to magento admin. Open any cms page and write block code in content section. {{block class="Magento\Framework\View\Element\Template" name="test_file" template="...
kiran's user avatar
  • 597
1 vote
1 answer
256 views

Magento 2: performance issue with Magento\Framework\View\TemplateEngine\Php::render

I have enabled the new relic log to check the performance of the Magento 2 website. On home page I am rendering 5 blocks with 5 template files. In new relic logs, it shows homepage takes time to ...
Niraj Patel's user avatar
0 votes
1 answer
36 views

On CMS block render by identifier, it brings wrong localization

I'm trying to render a CMS Block, to pass rendered HTML to jsLayout, on updater I have two CMS blocks, with same name, but for different store fronts (based on store front, the language is different). ...
KeyBi's user avatar
  • 1
0 votes
2 answers
1k views

Display product attributes in cms block or page builder

I need to be able to reference product attributes inside a cms block or page builder, I am not wanting to create any template files I am wanting to call it like you can call a variable. So here is one ...
Andyjw's user avatar
  • 11
0 votes
1 answer
233 views

i want to add accordion inside the cms block, but it is not taking

i want to add accordion inside the cms block, but it is not taking this is the code i want to add <div id="accordion" data-mage-init='{ "accordion":{ "activate": 2, &...
vinaysirige's user avatar
0 votes
2 answers
1k views

Magento 2 Passing parameters to Content Blocks

I'm new to Magento I want to create a block in the admin panel (Content > Elements > Blocks) which contains HTML code, CSS style, and some dynamic parameters under its content box. Example: <...
Tùng Nguyễn's user avatar
0 votes
0 answers
60 views

How to add a row within another row?

I want to add a row within another row through admin panel blocks. I'm trying to but it doesn't work so, is it even possible ?
Ammar Joma's user avatar
1 vote
2 answers
726 views

magento 2 how to get cms blocks toOptionArray

<?php namespace [Vendor\Module]\Model\System\Config; use Magento\Cms\Model\ResourceModel\Block\CollectionFactory; use Magento\Framework\Data\OptionSourceInterface; class CmsBlocks implements ...
Tj1997's user avatar
  • 47
0 votes
1 answer
944 views

Call CMS Block in Non-Checkout KO Template

I am using the WeltPixel theme and want to add add a CMS block to the ajaxlogin-popup.html file below the "Forgot Password" link. I am getting this error in console: Uncaught TypeError: ...
cjochum's user avatar
  • 131
0 votes
2 answers
788 views

How do you create or modify a CMS Block without Deprecated Methods?

How can I create or modify a CMS Block from a list according to that CMS Block if there is or not, in the same programming code without depracted methods? load() & save() -> is the deprecated ...
St3phan's user avatar
  • 2,907
0 votes
1 answer
861 views

Display a static block in Homepage listing all categories

I'd like to display a static block in my CMS Homepage which lists all 1 level categories. How should I do?
KaMZaTa's user avatar
  • 205
0 votes
1 answer
308 views

Product -> Content -> Edit with Page Builder -> Apply Template -> CMS Block application problem

When inserting the previously created CMS block into product description, i can apply template in pagebuilder in Super Admin, but i cannot apply template if i am not Super Admin. Is there any way ...
Gary Kim's user avatar
0 votes
1 answer
1k views

How to display CMS static blocks based on store in Magento 2

I have created two stores english and german and created static blocks with different contents based on the store in admin.Block Id(test) for both stores are the same but both blocks assigned to ...
Jothi Subramanian's user avatar
4 votes
1 answer
679 views

How "cms_block_store" and "cms_page_store" tables are working with Primary keys in Magento?

I have a general doubt in MySql foreign key constraints and Magento. As per MySql, a table should have only one primary key for a table and a Primary key should contain unique values. I checked in &...
Siranjeevi K S's user avatar
0 votes
1 answer
226 views

Can't get module to show in static block

Using Magento 2 I created a cms static block that points to {{block class="Inchoo\ModalOverlay\Block\etc" template="modal_overlay.phtml"}} I followed this guide on how to create ...
Carter's user avatar
  • 47
0 votes
3 answers
1k views

Header and Footer in Luma theme

I want some customization theme luma in my magento 2 website, so I need add in header for all pages banner - custom blocki created - (banner-section) below menu and in footer I need add custom block (...
Lerry's user avatar
  • 69
0 votes
3 answers
942 views

magento2 how to implement graphql with alpine.js get cms static block data

I have create a static block in magento2 admin panel. I like use graphql with alpine.js to get data of the static block.
mehul's user avatar
  • 1
0 votes
1 answer
31 views

Other Method for call a custom customer attribute

I am doing an internship in a company, and my internship supervisor wants me to display customer data. More precisely, on the back office in the customer information there is a custom attribute that I ...
Mikishilia's user avatar
0 votes
0 answers
310 views

How to add cms static block to category description programmatically

Instead of directly add cms block to category description, how to add programmatically?
zus's user avatar
  • 165
0 votes
1 answer
154 views

How to add CMS Static block above product Description Section

I want to add cms block above description, how to do in custom theme?
zus's user avatar
  • 165
0 votes
1 answer
235 views

How to set cms block design full width?

For my design i am using cms block as my hero banner, how to set full width?
zus's user avatar
  • 165
1 vote
1 answer
188 views

M2 - Best practice for adding custom less file in Custom Theme for CMS Static Block

I just created custom theme, i have followed a number of guides to properly setting up .less files in a custom theme and nothing seems to be working. Where should i place less file for cms custom ...
zus's user avatar
  • 165
1 vote
1 answer
201 views

M2 - How to include custom theme directory less file path into my CMS block?

I have created custom theme which is inherit from blank theme, I have created more than one CMS block and include into CMS page for home page design. One of my CMS block named service banner In the ...
zus's user avatar
  • 165
0 votes
0 answers
57 views

Pull in Terms and Conditions from Static Block

On Terms and Conditions we try to pull in a static block {{block class="Magento\Cms\Block\Block" block_id="terms_and_conditions"}} {{block id='terms_and_conditions'}} Both ...
Alex's user avatar
  • 13.8k
0 votes
3 answers
441 views

Magento 2 how to work with CMS blocks and CMS pages on repository?

I have created many blocks but as far as I know only by exporting them from database is the only way to have their code. Is there another way to have the files? because pushing and commiting .sql to ...
Oscar Vazquez's user avatar
1 vote
0 answers
162 views

cms blocks removing content after save in magento 2?

cms block break html tags after saving data. it is removing url of image and display like this <div class="col-sm-12 col-xs-12"> <a href="#"> <img class="...
jykmhar123's user avatar
0 votes
1 answer
154 views

show all products in one page on magento 2

I want to show all products in one page from a custom cms block. This is the code I tried: {{block class="\Magento\Catalog\Block\Product\ListProduct" template="Magento_Catalog::list....
blob's user avatar
  • 455
0 votes
1 answer
418 views

Display CMS Static Block At Shipping Step Outside Order Summary

I want to display a cms-static block outside summary at shipping & payment step in side bar please check below attachment of output Shipping Step Payment Page Find checkout_index_index.xml code ...
Harsh Jayswal's user avatar
1 vote
0 answers
189 views

Show wishlist counter on header when it doesnt have items

I need to display cart and wishlist counters on my own header block. For the first one i've just modified the CSS to display block. But I can't find how the wish list counter works, so it will show 0 ...
Ana Gonzalez's user avatar
1 vote
1 answer
458 views

Magento 2 - WYSIWYG uploaded images resized to 500px wide. How can I prevent this?

When uploading large images to be used within a block or page, Magento 2 resizes them to 500px width. I don't want that instead I want them left at their original size. I have no extensions installed ...
handcoded's user avatar
1 vote
0 answers
282 views

Cannot insert widgets in CMS page or static block, somebody know what could be wrong?

using Magento version 2.3.5-p1. Have the follwing problem and do not know why this is not working anymore. Editing a block, disable editor and clicking on "insert widget" I get a 404 page ...
Chequille's user avatar
0 votes
2 answers
170 views

How to add Slick Slider

I want to add slick slider on my home page in magento using static block and phtml with rotating images. if anyone have idea about that then please answer my question as soon as possible. Thank you ...
Deep Shah's user avatar
  • 561
0 votes
1 answer
95 views

Override xml files

Is it possible to override etc/import/block.xml with child theme ? I have modified block.xml itself and works fine for now but if I update 3rd party extension my modifications will be lost . I am ...
Giga Todadze's user avatar
4 votes
1 answer
3k views

Magento 2.3.5 - Inline Translate within a CMS Block

I'm running a multi website and store setup. I'm trying to use inline translation within a CMS block so I don't have to create multiple blocks for different stores. For example I'm using this within ...
user2240778's user avatar
0 votes
1 answer
165 views

Magento 2.3.4 - Call phtml file within CMS block

I'm trying to call the following phtml file into a CMS block. Phtml file location app/design/frontend/{Package}/{theme}/Magento_Newsletter/templates/subscribe_footer.phtml I tried using {{block ...
user2240778's user avatar
0 votes
0 answers
105 views

Magento 1.9.4.0 CMS Block Widget Issue

I'm trying to add widget to cms block or page but when i add it only display short code on page and not render, i tried different magento default widgets results is same also tried using code on ...
Suneth Kalhara's user avatar
0 votes
1 answer
2k views

How to update existing CMS block content using data patches?

I have updated content for the existing cms page by using data patches in Magento 2.3.3, but the same approach not working for CMS block. <?php namespace Test\CmsExport\Setup\Patch\Data; use ...
Muthukumar Sivasamy's user avatar
2 votes
2 answers
2k 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 ...
Sheshgiri Anvekar's user avatar
0 votes
2 answers
127 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 ...
Sayanth's user avatar
0 votes
1 answer
56 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 &...
jibin george's user avatar
1 vote
2 answers
2k 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" ...
Long Jackson's user avatar
1 vote
2 answers
1k 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 ...
S Adamson's user avatar
  • 709
1 vote
1 answer
260 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 ...
Haerriz's user avatar
  • 681
1 vote
0 answers
93 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.
Naresh Prajapati's user avatar

1
2 3 4 5 6