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 ...
user avatar
  • 3,438
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 ...
user avatar
  • 9,620
47 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"}}
user avatar
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 $...
user avatar
  • 32.1k
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"}}
user avatar
  • 17.6k
28 votes

Add static cms block in home page

I may be totally wrong, but you can call it like this {{block type="cms/block" block_id="home_image-center"}} in cms -> homepage-> content : in that click show/hideeditor past above code it's ...
user avatar
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. ...
user avatar
  • 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 ...
user avatar
  • 21.7k
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 ...
user avatar
  • 75.8k
22 votes

How do I add a block on the home page above the content, below the navigation on the home page only?

You don't need to create a module at all. You can use Widgets in Magento 1.4+: Click on CMS > Widgets: Click on "Add a new Widget Instance": Select "CMS Static Block" and the name of your theme: ...
user avatar
  • 35.6k
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.
user avatar
  • 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=""/>
user avatar
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>
user avatar
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"}}
user avatar
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/...
user avatar
  • 15.3k
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 ...
user avatar
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....
user avatar
  • 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 ...
user avatar
11 votes
Accepted

Call custom template in CMS page

Let me give you an example, if you want to define a homepage for your website, all you'll have to do is create a CMS page called "home" (original right?) and add {{block type="core/template" template="...
user avatar
11 votes

How do I add a block on the home page above the content, below the navigation on the home page only?

Create local.xml under app/design/frontend/your package/your template/layout/ And Put the code <?xml version="1.0"?> <layout version="0.1.0"> <cms_index_index> <...
user avatar
  • 75.8k
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 ...
user avatar
  • 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 ...
user avatar
  • 3,163
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="...
user avatar
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.
user avatar
  • 8,888
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....
user avatar
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 ...
user avatar
9 votes
Accepted

Add static cms block in home page

Right, so I (and you guys) were very close. In the current CMS page in Design > Custom design > Custom Layout Update XML field I had to put <block type="cms/block" name="home_center-image" before=...
user avatar
  • 1,283
9 votes
Accepted

Widget & Static Block vs. Template File

I don't think there is a right answer for this. The path you choose depends on your needs. I usually avoid using widgets. Specially when working with "not so technical" clients. The widget system in ...
user avatar
  • 196k
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:...
user avatar
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="-"> ...
user avatar
  • 3,602

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