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 ...
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 ...
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. ...
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 ...
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 ...
17
votes
2answers
35k 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=&...
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')->...
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 ...
14
votes
2answers
38k 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 ...
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 <...
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="-"...
11
votes
4answers
17k 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....
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 ...
8
votes
2answers
280 views

store_url does not render link correctly

I am using this link in my static CMS block <a href="{{store_url='produkte/insektenschutz/fenster/spannrahmen.html'}}"> but it renders as https://www.mysite.de/produkte/insektenschutz/fenster/ ...
8
votes
2answers
15k views

Custom template for static blocks in CMS page?

I searched the web and could not find how to do this. I want to add a static block that I have created in admin before to a cms-page. This works using either of this lines: {{block type="cms/block" ...
8
votes
2answers
1k views

New products not displaying on home page after product bulk upload

I was trying to bulk upload products in magento before uploading products everything was normal but after uploading my New product block is not displaying on home page http://new.sporteemail.com I ...
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 ...
7
votes
1answer
8k views

Magento2: How to remove the newsletter block?

I have newsletter signup block on my front page that I want to remove. However I can't seem to find it anywhere. With development mode I can see that it is being rendered from app/design/frontend/...
6
votes
2answers
9k views

Newsletter in Static Block Magento 2.1

I need to add default newsletter form in a static block. I have tried the following short codes: {{block type="core/template" template="newsletter/subscribe.phtml"}} {{block type="newsletter/...
6
votes
1answer
3k views

Block type in static block not working

On some of my websites I use this code: {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}} It works fine on three ...
6
votes
1answer
264 views

how to set Postion of static block on homepage?

I have created a static block programmatically on homepage. but it shows after the heading title. i want to set position for it. I want this New Block block between Registered Customer and New ...
6
votes
0answers
1k views

Displaying Subcategory Blocks Magento 1.9.2

I'm having trouble displaying subcategory blocks in Magento. I have followed several solutions posted on here and this tutorial. I created a static block with this code: {{block type="catalog/...
5
votes
2answers
449 views

What am I doing wrong with this nested block

I am using magento 1.9 and want to insert cookie restriction notice block on my page then try to render it in my homepage.phtml but got nothing and this static block(cookie restriction notice ...
5
votes
1answer
17k views

Call Custom phtml file in static block

In my theme package i create a custom.phtml file in theme_name/default/template/custom/custom.phtml , i want to call this file in static block i try this method : {{block type="core/template" ...
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
2answers
3k views

Widget & Static Block vs. Template File

When is it more appropriate to create a .phtml file and place it via local.xml, and when is it more appropriate to create a widget and place it in a static block via the backend? For example, I once ...
5
votes
2answers
4k views

Magento 2 - Test if Static Block is Enabled in custom template

In Magento 1.9, I could test if a CMS Static Block was active with the following code: if ( Mage::getModel('cms/block')->load('block_id')->getIsActive() == 1) {...} How would I do the same in ...
5
votes
1answer
2k views

Displaying Product Properties in a Static Block

Short of creating my own widget or block class to do so, is there a way to display a product's name, sku, price, or other property in a static block or CMS page? If there isn't a way to do this out ...
5
votes
1answer
663 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 ...
5
votes
1answer
1k views

Per page header Div with settings

I am just starting out learning Magento which is very daunting at first. My new employer uses it so I better learn it fast. I need to build an extension that basically allows me to insert a Custom ...
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
6answers
40k views

Make phtml template into a CMS static block

I have a code of left side category list in left_cat.phtml file. The code is like below. <div class="block block-left-category"> <div class="block-title"> <strong><span&...
4
votes
3answers
8k views

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

I'm trying to get the base url in a static block. I've tried the following code: <a href="{{base url=""}}../business"> I knew this wasn't going to work because it needs <?php ?> around ...
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 ...
4
votes
5answers
16k views

Add static block in specific CMS page

How can I add static block in specific CMS page? Can I do it through Layout Update XML?
4
votes
2answers
14k views

Magento 2 - Call a static block in the footer

I created a static block in backend of my magento and now i would like to recall the created block in the footer, near to the footer link . In what phtml files I retrieve it? Thanks. P.S. Where is ...
4
votes
1answer
28k views

Call custom template in CMS page

I would like to know how I can display custom code in a CMS page. When using static blocks I can use the following code: {{block type="cms/block" block_id="customcode"}} I guess it has to be ...
4
votes
2answers
5k views

How to add a static block on all pages on Magento 2

I want to add a static block on the left side of all pages. Can anyone tell me how to do that?
4
votes
2answers
14k views

Cms page (or static block) inside product description

I need to add some static content inside the product description. I have a store where I bulk add all my products via CSV import and many of them share common HTML code in the description field, for ...
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 ...
4
votes
2answers
4k views

Config Path variables available in Static Blocks

I've tried to find an answer for this, but can't manage to. I'm trying to access {{config path="design/header/logo_src"}} in a static block in Magento 1.9CE, but all design/header/* values seem to be ...
4
votes
1answer
1k views

Add setting to Static Block page?

I am working on a new extensions that stores some HTML data in Static blocks. To make it work as needed, I need to be able to add a new setting to the Static Block page that allows me to set a static ...
4
votes
2answers
4k views

Using variables in static block for email template

I used a static block in my email templates {{block type="cms/block" block_id="mail_include_header"}} Now I would like to use variables like {{var logo_url}} in that block but it does not resolve it....
4
votes
1answer
1k views

Calling a Static-Block in a CMS-Page is not working

I want to call a Static-block (Identifier* name isstatic-block-to-use-in-cms-page in a CMS Page. In CMS-Page's Content (Left Navigation Tab) field I called that static block by using this code {{...
4
votes
1answer
898 views

Static block not working in categories page

I added security patches a while ago, not sure if this is was the trouble maker or not. I have a page that should show all the categories as thumbs and it is broken. It is configured via template ...
4
votes
1answer
794 views

how to give links to the track order image to get the tracking information

i have added the track order image through static block in the footer,how can i give link to that image to get the tracking information.
4
votes
2answers
47 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 ...
4
votes
1answer
1k views

Is it possible to add child blocks to a block that has been defined in a static block?

In layout.xml you can define children like this <block...><block... /></block> Is the same possible if I add a block in a static block? I only know this notation: {{block type="...
4
votes
1answer
2k views

Static Block for specific products in magento

Is there any way to do this : I have two kinds of products, Handmade and ready women accessories. for handmade products I want a block under the price that tell the customer "This Product is 100% ...
4
votes
1answer
568 views

Create Block Hide/Show Editor removes empty span

I created a new block in Magento 2.3 and want to use <span> to place some icons in front of a text. I clicked on Hide/Show editor and pasted my code <div class="item"><span class="top-...

1
2 3 4 5
10