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
7 views

Our Static Blocks are showing above our breadcrumbs on M2

Our static blocks are showing above our breadcrumbs and we don't want them to. Is this a setting me are missing or something?
user avatar
0 votes
0 answers
13 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\...
user avatar
  • 1
0 votes
0 answers
16 views

How can I add static block with arguments in cms page?

I would like to add that static block {{block class="MSP\ReCaptcha\Block\Frontend\ReCaptcha" name="msp-recaptcha-newsletter" template="MSP_ReCaptcha::msp_recaptcha_newsletter....
user avatar
0 votes
2 answers
84 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://...
user avatar
0 votes
0 answers
22 views

How to show static block after addto cart in product detailed page?

I had created area calculator in static block and called in product detailed page but it is coming after the details but i need below the cart how can place this static block after to addto cart. For ...
user avatar
0 votes
1 answer
16 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?
user avatar
0 votes
0 answers
10 views

Magento widget not pulling through

I have a Magefan blog widget that is pulling through the widget code on the frontend on the dev site but it works on my local! The module is up to date on both sites but I'm not sure why it's working ...
user avatar
0 votes
1 answer
186 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') ...
user avatar
  • 359
0 votes
0 answers
34 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"> <...
user avatar
  • 3
0 votes
1 answer
41 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"> <...
user avatar
  • 3
0 votes
1 answer
80 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?
user avatar
  • 115
0 votes
0 answers
209 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=...
user avatar
0 votes
2 answers
367 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.
user avatar
  • 1
2 votes
3 answers
85 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 ...
user avatar
  • 109
0 votes
1 answer
37 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 ...
user avatar
0 votes
1 answer
139 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 ...
user avatar
2 votes
0 answers
116 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 ...
user avatar
  • 1,143
0 votes
0 answers
27 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.
user avatar
  • 1
1 vote
1 answer
266 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&...
user avatar
0 votes
1 answer
51 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 ...
user avatar
1 vote
0 answers
63 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 ...
user avatar
0 votes
2 answers
130 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 ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
0 votes
1 answer
138 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 ...
user avatar
  • 135
0 votes
1 answer
594 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 ...
user avatar
5 votes
1 answer
2k 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 ...
user avatar
1 vote
4 answers
1k 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:
user avatar
0 votes
1 answer
92 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). ...
user avatar
  • 1,739
1 vote
1 answer
75 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 ...
user avatar
  • 661
1 vote
0 answers
17 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 ...
user avatar
0 votes
1 answer
980 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 ...
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 ...
user avatar
0 votes
1 answer
487 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/...
user avatar
0 votes
3 answers
1k 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\...
user avatar
  • 1,739
0 votes
2 answers
360 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 ?
user avatar
  • 2,403
0 votes
2 answers
470 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....
user avatar
  • 11
0 votes
1 answer
39 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
user avatar
1 vote
1 answer
889 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">...
user avatar
1 vote
0 answers
304 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. <?...
user avatar
2 votes
2 answers
284 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() ?> <?...
user avatar
  • 895
2 votes
4 answers
1k 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-...
user avatar
0 votes
2 answers
2k views

Magento 2 How to update block programmatically?

How can i update block content programmatically?
user avatar
0 votes
2 answers
153 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\...
user avatar
0 votes
1 answer
404 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:...
user avatar
4 votes
2 answers
55 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 ...
user avatar
3 votes
0 answers
28 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="...
user avatar
  • 68
0 votes
1 answer
423 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 ...
user avatar
2 votes
2 answers
343 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 ...
user avatar
  • 254
0 votes
1 answer
117 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 ...
user avatar
  • 269
0 votes
1 answer
155 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/...
user avatar

1
2 3 4 5
10