Questions tagged [static-block]

CMS static blocks are a Magento utility that allow a site builder to make certain elements of a page editable. Elements that have been created as a static block can me modified by a site administrator through the Magento admin panel.

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

Magento2 Static Block Widget Renders As Raw Code Instead Of HTML

I have a CMS-created page where I used the "Insert Widget" option to insert a static block into the textarea field, which ended up as: {{widget type="Magento\Cms\Block\Widget\Block"...
BML's user avatar
  • 1
1 vote
1 answer
112 views

Placing image on CMS page in magento 2

I want to place an image on the bottom left corner of one CMS page like https://prnt.sc/3EQgzset5OTi . On clicking the image a pop up should appear with the form to fill up. Any idea how can i place ...
Nicola Smith's user avatar
0 votes
0 answers
20 views

In M1 you could place a Static Block anywhere. In M2 I cannot

Adding a block using a Widget works fine -- BUT my only choices are to add the block to ALL CMS pages or to All Category pages. I have specific blocks made for specific pages, how can I place them ...
Doug's user avatar
  • 1
1 vote
0 answers
135 views

pagebulider error on backed

Working on magento 2.4.4 instance.I created a block from backend and call that block in the homepage with help of pagebuilder.After saving the page, Error filtering template:Invalid block type:Magento\...
Ajith's user avatar
  • 66
0 votes
2 answers
403 views

How to move custom block in product detailed page

I had created custom block and called in catalog_product_view.xml file but it is coming after the description now I need that block after the price. For ref please find the below url aslo https://...
somutesting's user avatar
0 votes
1 answer
198 views

How to call Block in product detailed page?

i had created custom block in content -> block -> xyz (block name) now i wan to call this block in product detailed page. How can i call this block in product detailed page?
somutesting's user avatar
1 vote
1 answer
716 views

Pass variable from template (phtml) to CMS page

I have this code, which is rendering a static block in a template file (phtml). $_html = $this->getLayout() ->createBlock('Magento\Cms\Block\Block') ->setBlockId('test-block') ...
puntable's user avatar
  • 518
0 votes
0 answers
38 views

Layout XML in third party theme

I am a beginner in Magento 2. I installed a third party theme, in the home page, I founded this code on Layout Update XML field <referenceContainer name="slide.showcase"> <...
MMM's user avatar
  • 3
0 votes
1 answer
93 views

Position text inside ahref element (in center of image)

I created a static block with the following issue: I'm trying to center text inside an ahref element, which looks like the following; <div class="small-24 medium-16 cell"> <...
raaf's user avatar
  • 3
0 votes
1 answer
716 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
  • 195
0 votes
2 answers
466 views

How to call static block into graphql query in alpine js framework

enter code <div class="bg-container border-t border-b border-container"> <div class="container px-5 py-6 mx-auto flex items-center sm:flex-row flex-col" x-data=...
MehulKanjariya's user avatar
0 votes
3 answers
800 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
2 votes
3 answers
93 views

adding block to a layout

I have added a static CMS bock by set up patch, so I will now put it in a specific area like in cart information pop up or a different layout like payment checkout before payments methods. Update: I ...
coding mv's user avatar
  • 129
0 votes
1 answer
45 views

Magento 2: How to insert a custom phtml file in a static block

I need to insert a phtml file in a static block. The Location of the file is app/design/frontend/Pearl/weltpixel_custom/edu/custom.phtml I use "weltpixel_custom" as my child theme This is ...
Maurizio's user avatar
0 votes
1 answer
288 views

Button click to show custom static block in popup in magento 1.9

I have a custom static block and on my CMS page, I have a button, when the user clicks the button, I need to show the static block in the popup. How can I achieve this in Magento 1.9, can anyone help ...
Mahesh1343's user avatar
2 votes
0 answers
207 views

Magento 2.3: Automatically add HTML tags in a Static Block after save

Automatically adding HTML tags in a Static Block after save When saving static block from admin then after saving static block it is automatically adding HTML tags How can we solve it so that it will ...
sumeet bajaj's user avatar
  • 1,266
0 votes
0 answers
58 views

How to use custom fields of category in static blocks, magento 2.3.5

I want to add a custom attribute for category, then use that custom attribute value in a static block and call that static block in a phml file of custom theme file.
Raju's user avatar
  • 1
1 vote
1 answer
477 views

show child block under static block in home page in magento 2

I want to show color swatches of configurable product in home page But My all static blocks in cms page. Here is my static block {{block class="Smartwave\Filterproducts\Block\Home\LatestList&...
Niraj Patel's user avatar
0 votes
1 answer
82 views

Command line enable / disable static blocks

I would like to be able to enable and disable static blocks via the command line, is there a utility that provides this functionality. My use case is to configure a cron job to periodically enable ...
user1279887's user avatar
1 vote
0 answers
176 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
0 votes
2 answers
181 views

css is not working in magento 2 cart page

I have issue in cart page of my website . Currently home page and product pages are loading correctly but the cart page have issue Css and js fies in the cart page is not working Please help to ...
Abilash Erikson's user avatar
0 votes
1 answer
34 views

Static Block Incorrect size

I am very much a novice when it comes to magento. I've self taught myself in areas i can. Long story short a web designer who was all the talk and not much of the walk designed a website for our store ...
Mandy McK's user avatar
0 votes
1 answer
227 views

magento 2 How to add custom content under the buy button for a specific product

I want to add some custom content under the shopping button on the product page of the specified category. I have used the block and widget functions to create it, but the display position is not what ...
nextion's user avatar
  • 133
0 votes
1 answer
961 views

Magento2.3: How to hide static block-widget from specific page?

I have created one widget by creating a static block. My widget options are set to show on All pages. It's working fine. Now I need to hide that static block from the Checkout page, Cart page and ...
Teja Bhagavan Kollepara's user avatar
5 votes
1 answer
3k views

Magento 2.3.4 Page builder html wrapper

I have upgraded from Magento EE 2.2.10 to 2.3.4, I had some content blocks with custom html used for navigation links on various pages that were just tags. After upgrading If I try to edit a content ...
Trevor Orr's user avatar
1 vote
4 answers
2k views

Magento2: Pagination on listing page using static block

I have added a static block in the category Static block content: Category : It shows all the products on a page. toolbar not showing: How can I add the toolbar:
Hafiz Arslan's user avatar
0 votes
1 answer
128 views

Load Magento 2 static Block content in external website php file

I have a requirement like below. There is a website which is running in production mode in one server. That has some static blocks. A block is created with some content(Ex:Block_Id: sample_block). ...
Jafar Pinjar's user avatar
  • 1,929
1 vote
1 answer
210 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
32 views

Hide Static Block from Category View on Layer Nav Click

When I setup a category page I can set it to display products, a static block or both. I would like to display a static block but when any option in the layered nav is clicked, I would like to hide ...
WilliamD's user avatar
0 votes
1 answer
1k 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 ...
user84557's user avatar
0 votes
1 answer
25 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 ...
Jessica's user avatar
0 votes
1 answer
620 views

Magento 2 : disable cache for static block

In Magento, I can disable cache for static block by add cache_lifetime="null". {{block type="core/template" cache_lifetime="null" title="BEST SELER!!!" sku="ASS030530010" template="catalog/product/...
David Duong's user avatar
0 votes
3 answers
2k views

Create/Update static block programmatically in magento2

I am trying to create/update static block programmatically with recurringData.php from setup script. use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\...
Jafar Pinjar's user avatar
  • 1,929
0 votes
2 answers
518 views

Magento 2 - find out if text is from static block

I try to replace the footer with my own, but I have no clue how. I activated template hints, but it does not show any hint if this is a static block. How can I modify this ?
Black's user avatar
  • 3,150
0 votes
2 answers
514 views

Magento 2.3 static Block to replace subcategories in navigation

I am attempting to add a block in place of the subcategory in the main navigation or site navigation. I don't want to use a bloated extension, just minimal code. I am using a blank custom theme I made....
Demasys's user avatar
  • 11
0 votes
1 answer
60 views

How to call static block into plugin Processor php file in magento2

How to call the static block into magento2 plugin processor php file. thanks
venkata prasad's user avatar
1 vote
1 answer
1k views

Magento2 : How to add social link in static block in PWA

I have created one Static block with added below content in and I need to add social links in PWA. <a class="footer-facebook" href="https://www.facebook.com/" target="_blank" rel="noopener">...
Hitesh Koshti's user avatar
1 vote
0 answers
327 views

Magento 2 add CMS block under discount code section on the checkout page

I want to add third party JS code and HTML on the checkout page under discount code section. To add it under discount code first in Checkout_index_index.xml file I have added following code. <?...
Jackson Wyss's user avatar
2 votes
2 answers
415 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() ?> <?...
TN98's user avatar
  • 923
3 votes
4 answers
3k views

How to remove extra divs in my Page Builder CMS blocks?

While I'm saving the static block extra div's are adding to static block. How to avoid the divs in Magento 2.3? <div data-content-type="row" data-appearance="contained" data-...
venkata prasad's user avatar
1 vote
2 answers
3k views

Magento 2 How to update block programmatically?

How can i update block content programmatically?
Ibrahim Aldar's user avatar
0 votes
2 answers
273 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\...
Rafael Alves's user avatar
1 vote
1 answer
454 views

add style on static block

I have HTML code for slideshows and [CSS and javascript] but on the static block in magneto 2.3 I can not add a link to CSS and javascript Example . before save <script src = "http://localhost:...
Hassan Kamar's user avatar
4 votes
2 answers
154 views

How to create a custom form?

I am trying to create a create a page in block but I'm trying to add a custom contact form. I can view it in frontend but it wouldn't work its not doing anything when I click submit. is there anyone ...
jibin george's user avatar
3 votes
0 answers
34 views

insert different block in the middle of block content

I have a phtml for a block like this : app/code/Vendor/Modul/view/frontend/templates/main.phtml <div class="business-container"> <nav class="mini-head"> </nav> <div class="...
blue's user avatar
  • 118
0 votes
1 answer
602 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 ...
Morgan Smith's user avatar
2 votes
2 answers
634 views

Magento 2: How to add a div in below navigation?

I am trying to get a div displayed directly below the navigation on a theme which extends Luma I have added the following into my Magento_Theme/layout/default.xml but cannot see any results. The ...
Boss Nass's user avatar
  • 264
0 votes
1 answer
165 views

Add content of static block as new tab to product detail page

I created 3 static blocks with just a random headline for now, where I want to add html content later. the ids of the blocks are: warranty instructions certificates I then created 3 .phtml files ...
Chaz's user avatar
  • 269
0 votes
1 answer
187 views

Magento 1 : Unable to save the Static blocks on edit existing blocks

I have 1.9.0.3 Magento website, everything was fine, website wasnt edited in a year and when I tried to edit some existing static block and save or save and continue editing I am returned in CMS/...
kulasklan's user avatar
2 votes
2 answers
2k views

Get static block content by identifier in helper class?

I am trying to get the content of a static block in a helper class. So far I had no luck. So, how can I get the content of a static block by block identifier in a helper class? I tried: $...
Arnie's user avatar
  • 952

1
2 3 4 5
10