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
78
votes
13answers
32k views

Magento 1.9.2.0 static block display issues

I have a website with multiple static blocks which was working in 1.9.1.0, but with 1.9.2.0 the static blocks start displaying sporadically, as they sometimes show the wrong block rather than the ...
17
votes
2answers
34k 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=&...
18
votes
4answers
3k views

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

When I upgraded to EE 1.14.2, most things went smoothly but I came across an issue when I started to check my various frontend pages. I have a catalog node with several subcategories and each of those ...
16
votes
2answers
53k views

call static block in view.phtml insted of phtml file

we are displaying text field in view page to check COD availability. view.phtml echo $this->getLayout()->createBlock('core/template')->setTemplate('checkdelivery/checkdelivery.phtml')->...
21
votes
3answers
17k views

CMS blocks disappeared after 1.9.2.2 update

Last night my backend was auto updated to 1.9.2.2 release. Today all my static block on CMS pages have disappeared. They wereconfigured for all store views and I tried each of the views and they are ...
11
votes
2answers
13k views

How to create a static block which displays all categories

I want to create a static block which displays all of my categories and displays them in a list. I don't need an image and I don't need the sub categories. Then I want to add this block to my home ...
23
votes
5answers
47k views

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

How do I add a block to the home page only above the content section, but below the navigation to spread across the page whilst still using the two-column template? I am using Magento version 1.9. ...
15
votes
4answers
4k views

CMS block caching issue in EE 1.14.2

I have an issue that seems to be related to the caching of CMS static blocks. I have a cms page and within that page I am rendering a number of cms static blocks. A simplified version of the CMS ...
7
votes
1answer
5k views

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

I have install Magento2 and create static block how can I call my theme images in static block ? In Magento1.x we used {{skin url="images/demo.jpg"}}. Any one have idea for how to call images in ...
11
votes
3answers
32k 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="-"...
4
votes
4answers
4k views

CMS Block Cache issue with included dynamic template

I've seen lots of issues with CMS block caching in Magento 1.9.2.0 and have an issue where I've created a static block that loads the current category ID and then displays variables that have a ...
3
votes
3answers
7k 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
496 views

Proper method to get an attribute yes/no value so it is not translated

I'm trying to display a different static block for certain types of products. I am able to get this to work with my code bellow, however when switching store views the static block disappears even ...
12
votes
1answer
13k views

What is the difference between getChildHtml and getBlockHtml

Synopsis What is the difference between getChildHtml and getBlockHtml? How can I get the cms/block title in the template? I have essentially replaced the footer with my own footer and set my own <...
14
votes
2answers
37k views

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

How can I get (current store) Base Url in CMS block/page in Magento 2? Actually, I am displaying category names in the footer by using static block. For that how can I give the Category Url links in ...
25
votes
6answers
121k 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 ...
2
votes
1answer
17k views

CMS Block Widgets for Individual Products

I'm working on a CMS Block to show featured products on the home page. I set up my own template file which loads $this->getProduct() for the data. The problem I'm having is that I'm using the ...
5
votes
2answers
20k views

Using “Layout Update XML” to add a block to the sidebar

When I create a new page in Magento 2 using the "two columns with left bar" layout it by default puts the wishlist in there. Using the "layout update XML" in the design options tab I can remove that ...
5
votes
1answer
3k views

Magento 1.8 static block in widget not showing?

I have created simple static block and trying to show it through widget inside Left Column but its not showing. In fact any static block is not working through widget. I have created magento theme in ...
4
votes
4answers
16k views

Call static block into another static block through template

I want to call a static block into another static block if the right conditions are met. I believe that my main problem is how to register the template in XML, as I never worked with it before. First ...
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%;'&...
2
votes
2answers
3k views

magento2: add static block to header menu

My Categories are displayed in my Header Main menu. Now I want to add another link( called 'about us') after the last category in my header. I plan to create a static cms block -> in it's content put ...
3
votes
1answer
1k views

Punch hole in FPC for a static block inside a CMS page, without a custom module

On the homepage of our site, we have 3 banners which are contained in a static block inside the CMS page of my homepage. The static block also contains a widget, the widget select random banners ...
3
votes
3answers
5k views

In magento 2 How to call phtml file in static block [duplicate]

I have created extension in Magento 2 and i want to call index.phtml file from static block (from admin panel). Module structure Ashore>Faq>Block>Faq>Index.phtml Ashore>Faq>View>frontend>...
2
votes
1answer
1k views

How to add a block at the very top of every page?

I would like to know how to add a block at the very top of every page in my website. It would be just a 'bar' with the purpose of displaying important information periodically, like - for example - ...
1
vote
1answer
101 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&...
1
vote
2answers
2k views

Position Static Block under Category Grid

I have 3 categories set up to display Static Block & Products however I would like the static block to be displayed under the category grid. As this is not for every category only a few is there a ...
1
vote
1answer
2k views

Showing static block only to specific customer group

I have a webshop were I have to hide away the login and create user form, because I only want customers with a specific link to be able to register. When they have registered they will be able to see ...
1
vote
1answer
575 views

Mulitple store: Same CMS and static pages but loads different content for different stores

Multiple stores (version 1.9): I can add category description individually for each store and it will display individually for specific stores. Requirement: I want same functionality for CMS and ...
1
vote
1answer
771 views

In static block call .phtml file for specific product id

I have a template which uses banners on the homepage,these banners get filled by a static block like the following: <div class="col-sm-6"> <a href="{{store url=''}}women.html"> &...
0
votes
2answers
608 views

how do i include a static block in the footer only on homepage

This is my xml <cms_index_index> <reference name="content"> <block type="cms/block" name="block_video"> <action method="setBlockId"><...
0
votes
1answer
1k views

How to call phtml file in static block - Magento 2 [duplicate]

I created a file in phtml and would like to call it in a static block. I created the cms folder inside the theme. My route is different and is not a duplicate /public_html/app/design/frontend/...
0
votes
1answer
142 views

How to copy “list view” style to a new file random.phtml?

I have created a random.phtml with the following code to list few products in the product page. <?php $manufacturer = Mage::registry('current_product')->getMerchantName(); $...
0
votes
1answer
1k views

calling a phtml file in static block and vice versa is not working

in cart page , we implemented a feature of finding shipping charges using this file : app/design/frontend/default/theme/template/checkout/cart/shipping.phtml I need the same feature in cart page.... ...
0
votes
5answers
2k views

PHP code in Block

Is there any way to add a simple php code: <div title="<?php echo $_product->getAttributeText("manufacturer"); ?>"></div> to a block we create under content page. It can't ...
0
votes
2answers
160 views

How do I add a CMS Static Block Text Box To All Product Listings In Magento?

I would like to display a CMS Static Block text box at the bottom of all product listings in Magento, but I would need the code to put in CMS -> Static Blocks in the admin panel in order to do so. ...
0
votes
2answers
1k views

Display static block data in controller method

Hello, I have created one static block. I want to display data from that static block in my controller method. Here is my controller method: <?php class NameSpace_Module_IndexController extends ...