62 votes

Magento 1.9.2.0 static block display issues

I had this problem with EE 1.14.2 and it looks like the same issue has come up in CE 1.9.2. I documented my problem and solution on this SE question. Basically due to the following code being added ...
  • 3,478
56 votes
Accepted

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

If you want to call static block in page Try below code : {{block class="Magento\\Cms\\Block\\Block" block_id="block_identifier"}} If you want to call in phtml file : Try below code : <?php ...
  • 9,710
50 votes
Accepted

Magento 2 get base url (current store) in admin static block/page?

You can add current store URL in static block. {{store url=""}} If you wanto add store url with category URL. {{store url="category-url"}}
46 votes
Accepted

call static block in view.phtml insted of phtml file

You can use the below code: in .phtml file : <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); ?> sample : <?php echo $...
  • 32.3k
42 votes
Accepted

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

Try below code in cms page, If you want to call phtml with in cms page. {{block class="Magento\Bannerslider\Block\Slideshow" template="Magento_Bannerslider::bannerslider.phtml"}}
  • 17.7k
27 votes
Accepted

CMS blocks disappeared after 1.9.2.2 update

My understanding is that CE 1.9.2.2 includes all the changes from the recent-patch SUPEE-6788, one of which was restrict the blocks that can be used in CMS blocks, pages, emails (etc...) by default. ...
  • 1,234
25 votes

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

You can use Magento\Framework\View\Element\Template class to call phtml files {{block class="Magento\Framework\View\Element\Template" template="Vendor_Module::myfiles/myfile.phtml"}} To call ...
  • 22.1k
24 votes

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

In magento,if you want to add block class in cms page, then you can tre below code {{block class="Magento\Bannerslider\Block\Slideshow" template="Magento_Bannerslider::bannerslider.phtml"}} Formula ...
  • 76.4k
20 votes

CMS blocks disappeared after 1.9.2.2 update

I used below method: System > Permissions > Blocks Add New Block Block Name: cms/block Is Allowed : Yes This seems to have done the trick for me.
  • 433
19 votes
Accepted

Magento2 : how can I call my theme images in static block

You can call theme images from static block like this in magento2 : <img src="{{view url="images/demo.jpg"}}" alt=""/>
17 votes
Accepted

Magento2 - Is it possible to get base url in a static block?

You can get base url in static block like this. <a href="{{store direct_url="business"}}">Your link</a>
15 votes
Accepted

Newsletter in Static Block Magento 2.1

You almost had it. Here's the code you need to use: {{block class="Magento\Newsletter\Block\Subscribe" name="static.newsletter" template="Magento_Newsletter::subscribe.phtml"}}
14 votes
Accepted

Call Custom phtml file in static block

You don't need to include the theme's directory in the template path, Magento will automatically use the current theme and fallback structure. For example: {{block type="core/template" template="page/...
  • 15.5k
13 votes

Add static cms block in home page

It is a late reply, but i will share. It is true that you can do it all from admin. You can add any static block to any cms page directly from admin as a widget. Open the CMS page and then click on ...
13 votes

Magento 1.9.2.0 static block display issues

I just upgraded to 1.9.2.0 and I'm experiencing this too. Categories that are set to display Static Blocks + Products are randomly displaying the wrong Static Block. This did not exist prior to my 1.9....
  • 313
13 votes

Magento 1.9.2.0 static block display issues

Here we go with local module based solution as above solution does not provide whole steps. We need to create Custom module because you all know that Magento Boogieman will get you! if change the core ...
11 votes

EE 1.14.2 / CE 1.9.2 block caching update has non-unique cache keys - duplicate content showing on frontend

Since this was EE, I was able to utilize Magento support but I also worked things out on my own to help focus the issue and get a solution as fast as possible. The code changes were provided by ...
  • 426
11 votes
Accepted

Magento 2 - Call a static block in the footer

From templates you can simply call static block by <?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?> Links in ...
  • 3,203
11 votes
Accepted

Magento2: How to remove the newsletter block?

You can remove this block completely via layout with remove="true": app/design/frontend/TemplateMonster/Spiceli/Magento_Newsletter/layout/default.xml <?xml version="1.0"?> <page xmlns:xsi="...
11 votes
Accepted

store_url does not render link correctly

Add store direct_url instead of store_url <a href="{{store direct_url='produkte/insektenschutz/fenster/spannrahmen.html'}}"> spannrahmen.html will show after this.
  • 9,103
10 votes

EE 1.14.2 / CE 1.9.2 block caching update has non-unique cache keys - duplicate content showing on frontend

I think proper way is we need to create Custom module because you all know that Magento Boogieman will get you! if change the core :) You will need to following files: app/etc/modules/Bhupendra_Cms....
10 votes
Accepted

Using "Layout Update XML" to add a block to the sidebar

To reference a container you need to use referenceContainer as opposite to referenceBlock to reference a block. The container tag is used to create a container as the block tag is used to create a ...
9 votes

Magento 2 get base url (current store) in admin static block/page?

You can add store URL in static block: <a href="{{store direct_url='identifier'}}">Your link</a>
9 votes

magento 2 : How to add static block in (.html) file?

To add static block over the Place order button!, you need to declare a PHTML file in checkout index anywhere in theme. STEP 1: Create a new XML file in theme checkout_index_index.xml <page xmlns:...
8 votes

Add static block in specific CMS page

To add static blocks through Layout Update XML in CMS Pages use something like this code <reference name="right"> <block type="cms/block" name="your.1st.block.name" before="-"> ...
  • 3,602
8 votes
Accepted

Adding custom CSS / JavaScript to Certain CMS Pages With Custom JS Path

Try bellow way Add custom CSS or JavaScript to CMS Pages With Custom JS Path <reference name="head"> <action method="addItem"><type>skin_js</type><name>js/...
  • 9,592
8 votes
Accepted

White listed static block is not displaying in home page

You need to enter the block type="cms/block" instead of the block_id="home-news-text" into the permission form for your blocks to show up.
  • 17.3k
8 votes

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

This should work: <referenceContainer name="sidebar.additional"> <block class="Magento\Cms\Block\Block" name="yourblockid"> <arguments> <argument name="...
  • 7,366
8 votes
Accepted

What am I doing wrong with this nested block

Instead of using getChildChildHtml('cookies.notice') Use getChildHtml('cookies.notice') We are usinggetChildChildHtml when we want to get 2nd level of child block For getting first level of child ...
8 votes

store_url does not render link correctly

Try adding this to your block: <a href="{{store direct_url="produkte/insektenschutz/fenster/spannrahmen.html"}}">Link to Base URL</a>

Only top scored, non community-wiki answers of a minimum length are eligible