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.

110 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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/...
4
votes
1answer
288 views

A-Z Category Listing Magento 2 Static Block

I am attempting to create a A-Z category listing within a static block, something like the attached image. The static block will be on the parent category, and the listing will show the parent ...
3
votes
0answers
23 views

insert different block in the middle of block content

I have a phtml for a block like this : app/code/Vendor/Modul/view/frontend/templates/main.phtml <div class="business-container"> <nav class="mini-head"> </nav> <div class="...
3
votes
3answers
495 views

Magento 2: Static block image upload not working

I am using Magento 2.3 I am unable to upload image static block. It will show insert file instead of image. I don't know what is the problem here
3
votes
1answer
445 views

Get every string of static block identifier Magento 1.9

I have to modify mega menu extension in Magento 1.9. Currently, its showing static block at bottom of category. I want to separate static block identifier name based on some symbol like _ in my ...
3
votes
0answers
38 views

How to insert create customer account form layout to a block as a widget

I want to insert customer_account_create.xml content which containing the create customer account form into one of my block that I created from backend > content > blocks > add new block Is there ...
3
votes
1answer
839 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 ...
2
votes
2answers
329 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
0answers
118 views

How to get website/store id in the cms blocks/pages Magento2

I'm checking this for long time but couldn't get this.I would like to display the website id through the magento cms block/pages.Without calling it from phtml's. Thanks in Advance.
2
votes
0answers
186 views

Category page, static block and layered navigation

On Magento 1.9 I have a category page with produts and static block. For static block I used a block type="catalog/product_list with a custom template. In the html template I loaded a custom ...
2
votes
2answers
414 views

Can't apply custom layout update to block?

I have a static block identifier named 'can_content_block_ideas' and within that block the following template file is being called {{block type='core/template' template='can/home/featured.phtml}} ...
2
votes
0answers
402 views

Display dynamic Content in Magento Static Block

I have declared a static block in Magento 1.9.3.2 named 'subcategory_listing' that has the following code: {{block type="subcategory/listing" name="subcategory.listing" template="category/...
2
votes
0answers
369 views

I want to upload image in each static block of magento

I have not much expertise in magento so please pardon me if i am doing pretty much wrong. I am using Magento ver. 1.9.3.2 I want to add a new image field in magento static block. I want to use this ...
2
votes
0answers
685 views

Magento 2 : How to Load a Cms Block and Set Custom Variable Values

I created cms block with custom variable name 'redemption'. I wanted to load cms block, pass and replace value to custom variable 'redemption'. Please help, It's Urgent.
2
votes
0answers
61 views

Static Block goes missing from home page

I have a Static Block that I've created. When I flush Magento cache, I see the static block on my home page which is what I want. However, if I come back the next day, my static block is missing. ...
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 ...
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 ...
2
votes
0answers
105 views

Static blocks rendering short code on front end - after whitelisting

I am hoping someone can offer some advice / direction. I have a problem with Magento static blocks that I can seem to sort out even after a lot of reading / testing. I know enough to be dangerous ...
2
votes
0answers
64 views

How can I add a different static block to each paginated page in my catalog?

Right now I have a static block with content on each of my category catalog pages. When users page through the paginated catalog results, the block is static and does not change content. I would ...
2
votes
0answers
828 views

Magento 2 : Error when trying to display the content of a static block on the product view page via a widget

I am trying to display from a certain category on all my product detail page. I can use the following code on any cms page and the content is displayed. {{block class="Smartwave\Filterproducts\Block\...
2
votes
1answer
235 views

Inserting a Static Block In Category Page - Avoid Cache

I want to place a specified Static Block in my category page on my Magento site. The code should look up if a specifically named Static Block exists, and if so display the content of it. I do this on ...
2
votes
0answers
573 views

Widgets + Static Block issue

I am struggling with an issue since yesterday, i really need some help from someone who is more experienced with magento. I have a problem with the Widgets/static blocks. Whenever i create a static ...
2
votes
2answers
450 views

Header static block/widget with image switch on browser refresh

I have 4 season sets of images. winter-images, spring-images, summer-images and autumn-images. Every set has 5 images which has to switch on browser refresh. I want to have them in 4 separate static ...
1
vote
0answers
13 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
1answer
49 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 ...
1
vote
0answers
139 views

Magento 2 add CMS block under discount code section on the checkout page

I want to add third party JS code and HTML on the checkout page under discount code section. To add it under discount code first in Checkout_index_index.xml file I have added following code. <?...
1
vote
0answers
206 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-...
1
vote
0answers
30 views

Edit dropdown attribute of Sub category

I am trying to fill-in the information of a product category in Magento v.1.9.4.1, however, I am unable to locate or figure out how to add an additional option under this "Dropdown" menu I was able ...
1
vote
0answers
55 views

How to make checkout a static block / have identifier like static blocks or pages?

Can I make magento checkout to have an identifier/ID like static blocks and pages? What's the best practice or solution to do this? I'm currently calling out magento pages / static blocks through ...
1
vote
0answers
105 views

Magento 1.9 Warning: require_once and Fatal error: require_once

Anyone, can you help me how to solve this? Warning: require_once(/srv/app/Mage.php): failed to open stream: No such file or directory in /srv/public_html/abstract.php on line 85 Fatal error: ...
1
vote
0answers
316 views

Magento 2 : Pass URL from Static block to PHTML

In my static block, Following is code {{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::html/homepage-blocks.phtml" title="Scoring &amp;...
1
vote
1answer
181 views

Cannot create static Cms block from backend

Whenever I try to create a new static block from the backend, I always get the notice "Could not save block, sorry something went wrong". Checking logs I found this exception of the violation of ...
1
vote
1answer
75 views

How to Remove description text from product slider - Luma Theme

Please check. Luma Theme This one is from website Homepage Product tab This is Product slider / carousel Magento - It's coming from block. My question is - Can we remove description lines. If yes, ...
1
vote
0answers
35 views

Single Static Block Linking To 50 Different URLs

I have a banner image that I need to display in approximately 70 categories on my website. The banner will link from one specific category to another specific category, but will be different every ...
1
vote
2answers
726 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 ...
1
vote
4answers
224 views

$this keyword is not available in template of core/template block

I want to execute some custom PHP code in a static CMS block. I want to do this by having a block of type core/template loading a template containing the PHP code. I have created the block and can do ...
1
vote
2answers
797 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&...
1
vote
1answer
599 views

Move Static Block created from admin panel to above the Breadcrumb in magento 2

If the question was not understandable. I want to move the a block (which contains 2 images) , which was called in a catalog page. The block and catalog page were created in admin panel. i think a ...
1
vote
0answers
32 views

Community Poll at checkout

Does anyone know how do I add a community poll at the end of my checkout success page? I know I can use widget and add a static block but I can't seem to find the correct code. I am using Magento CE 1....
1
vote
0answers
53 views

How to add class to javascript document.write & shorten date format?

<div class="shipout"> <p style="margin:0;">Delivery: FAST & FREE</p> <script> Date.prototype.addDays = function(days) { var dat = new Date(this.valueOf()); dat.setDate(...
1
vote
0answers
1k views

How to add static blocks to transactional emails?

I have been looking around on how to add a static block into the transactional emails. I found the solution on github here: https://gist.github.com/mkdizajn/6351957 The regular way to add a static ...
1
vote
1answer
194 views

Magebuzz manufacturers extension on a static block

I'm tring to display the manufacturer list in a Static Block on Magento 1.9.3.2 But cannot understand how to do this: {{block type="Magebuzz/Manufacturer" name="manufacturer" template="Product/...
1
vote
0answers
16 views

Static blocks for each page section

i have in page 3 section for static blocks, i need in admin add for each section unlimited static block with title, image and site url. How i can do easy? Thanks
1
vote
0answers
53 views

How do I add the catalog/navigation block or am I just lost?

I am working on Magento 1.9.2.4 using a Porto theme. I am trying to get my sub category listing block working so it shows the sub category on the parent category page. The links are showing and ...
1
vote
0answers
139 views

Cannot Insert Image In To Static Block

I need to change the front banner of my site, but the button to "Insert Image" in to the static block does nothing when you click it. None of the buttons do. I also wanted to make a coupon code and ...
1
vote
0answers
117 views

Encoding url in static block Magento

I want to encode an url in static block and decode it in result controller in catalogsearch module. This is what I have: How to encode from q=britania and pass it with href and later decode it in ...
1
vote
1answer
473 views

Magento 2 - Conditional Static Block

Is there any way for you to conditionally display a static block? For example, I want a block on the homepage that will only display if there is content in the block. If it is empty, the block ...
1
vote
0answers
108 views

Finding static block name

I am working on theme, but installed sample data as i didn't have data to work on. Now that i am using my own package and theme, the previous default theme left a broken series of images which were ...
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 ...