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
1answer
20 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 ...
0
votes
1answer
902 views

Magento2 Hiding static-block in checkout pages

I edited this file [vendor]/[theme name]/Magento_Checkout/layout/checkout_index_index.xml and use this code to hide the static block: <referenceContainer> <block name="custom.block.header" ...
0
votes
2answers
2k views

Magento 2.3.0 - Add custom block after product description tabs

I've created a CMS block called km_product_page_short_description I want to call this CMS block in a custom block below the product description tabs (where the blue line is) as shown in the ...
2
votes
3answers
1k views

How do I find the location of a page?

I have a contact page that is not in cms pages. It has a static block that is only used on this page. I can edit it and see it, but can not find the page. Any suggestions on how to track it down? Is ...
1
vote
0answers
13 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 ...
0
votes
2answers
1k views

Why changes in a CMS block doesn't appear?

I have a quite simple problem which I can't address. I've been changing Static Blocks from CMS -> Static Blocks (e.g. a Prices page). Once I change the Block and save it, my website doesn't seem to ...
1
vote
2answers
832 views

Responsive a static block - Magento 1.9.2

I was able to create full width sliders on a single page using custom css added to the design tab for the page: <reference name="head"> <action method="addItem"><type>skin_css&...
0
votes
0answers
18 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.
2
votes
2answers
2k views

How to add a second static link block in footer (Magento2)?

Currently I only have 1 static block with footer links. I would like to have a second one like in the image below (image is from magento1.9) I would also like to add a "title" to the footer link ...
0
votes
0answers
14 views

checkout cart page add cms static block in magento 2.4.0

Now i am trying add cms static block in checkout_cart_index.xml file add but not added block in checkout cart page checkout_cart_index.xml <?xml version="1.0"?> <page layout=&...
1
vote
1answer
112 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&...
5
votes
1answer
858 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 ...
2
votes
2answers
463 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: $...
2
votes
2answers
1k views

Magento 2 decode widget code in category description

I have added widget(call static block) in category description http://prntscr.com/ko816y.But it is not call widget in front just showing output as it look in admin WYSIWYG editor. So,I want to convert ...
0
votes
2answers
331 views

TinyMCE - Update Validation Config Settings to allow <div> inside <a>

I have an issue where TinyMCE is removing my links in my static CMS blocks. I believe this is because the anchor includes div's which doesn't meet the validation for TinyMCE. How is it possible to ...
11
votes
4answers
19k views

Magento 2: Call phtml file in static block or cms page

I would like to call a Magento phtml file to a static block I have a custom theme! How to do it, please? here /public_html/vendor/magento/module-catalog-search/view/frontend/templates/advanced/form....
0
votes
1answer
17 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 ...
0
votes
0answers
16 views

Create Static Block using Module and display in all pages in Magento 1.9

I am new to Magento . I am going to create a static block by using Module , which is going to display some content and try to call that block in all my pages. For Example : I am going to display an ...
17
votes
2answers
37k views

How to call a PHTML file within a CMS page Magento 2?

Magento 2 I have installed a sample Bannerslider module downloaded from Magestore. When I call bannerslider.phtml into CMS Home Page, it's showing unreliable error on the home page. {{block class=&...
1
vote
0answers
19 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 ...
1
vote
0answers
252 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-...
2
votes
2answers
3k views

Insert block inside static block magento 2

I create static block with reference name 'seller_registration_form' from Magento 2 backend which loaded in home page like this: Now i want to insert additional content from my module, so i created ...
3
votes
1answer
948 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 ...
0
votes
0answers
26 views

Magento 1.9 - How to get contact Us page on Category -> Display Setting -> CMS block?

I have contact us page on my website URL like website.com/contact I want if i click my category show contact page. I am created CMS Static block: And assign to category page: if i click category ...
0
votes
2answers
68 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 ...
1
vote
3answers
2k views

Add custom block before main content only on the contact page

i would like to add a static block between the nav menu en the content so i can give it the full width of the page. This block must only be visible for the contact us page. System: magento 2.1 ...
1
vote
4answers
7k views

Pop-Up Email Subscription

I have a link in my static-block that says "subscribe". When users click that (and ONLY when they click that), I want a pop-up box to appear on the page that allows them to enter their email address ...
0
votes
1answer
18 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 ...
1
vote
2answers
753 views

Add a block to a page with event observer

I'm trying to add a static block to a page with an observer. The event that I'm listening to is controller_action_layout_generate_blocks_after and this is my observer code: <?php ... class ...
0
votes
1answer
37 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 ...
0
votes
0answers
30 views

How can I call a {{block type}} for related products?

I have blocks that call featured home products in a sidebar (see example below): {{block type="filterproducts/featured_home_list" name="featured_sidebar" product_count="6" template="filterproducts/...
0
votes
1answer
282 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 ...
0
votes
2answers
254 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....
1
vote
4answers
500 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:
0
votes
1answer
45 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). ...
26
votes
6answers
122k views

Add static cms block in home page

I have read different tuts about this and some say it all can be done from the admin panel, others say I have to add code in my layout and in the template files. Well, nothing works... I created the ...
11
votes
3answers
33k views

How to call static block in left sidebar in a page in Magento 2

How can we call a static block in Magento 2 in a page. In Magento 1 we have this with the following code: <reference name="left"> <block type="cms/block" name="Klantenservice menu" before="-"...
1
vote
1answer
53 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 ...
1
vote
0answers
15 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 ...
0
votes
1answer
409 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
667 views

Magento 2 : Static blocks with products on category landing page

I am stuck in a situation here, In Magento 2 Category settings and I wants approaches from you guys. In Magento 2 I have created a category with Static blocks with products to show settings on the ...
0
votes
1answer
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 ...
0
votes
1answer
176 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/...
0
votes
2answers
655 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\...
0
votes
2answers
172 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 ?
3
votes
3answers
8k views

Magento : disable cache for static block

I have one file that called from static block in which i display product information on menu. {{block type="core/template" title="BEST SELER!!!" sku="ASS030530010" template="catalog/product/...
2
votes
2answers
1k views

Add conditional statement in the static block in magento

My following code is under static block and i am trying to achieve following functionality. I print invoice using the following code: {{if order_date == '03/06/2017'}} <td style='width: 15%;'&...
0
votes
1answer
24 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
1
vote
1answer
337 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">...
3
votes
2answers
2k views

How to get the block ID and block title when is rendering

I'd like to add the block ID and the block name among the classes, so I found the file which has the HTML structure. vendor/magento/module-cms/view/frontend/templates/widget/static_block/default....

1
2 3 4 5
10