Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
21 views

add style on static block

I have HTML code for slideshows and [CSS and javascript] but on the static block in magneto 2.3 I can not add a link to CSS and javascript Example . before save <script src = "http://localhost:...
3
votes
2answers
28 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 ...
3
votes
0answers
20 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="...
0
votes
1answer
24 views

Add css to a block Magento 1

In Magento 2, there is a box to place custom CSS to any block. However, I don't see that as an option in Magento 1 How do I add custom CSS to a block in Magento 1? Edit for possible dupe: I want ...
2
votes
2answers
28 views

Magento 2: How to add a div in below navigation?

I am trying to get a div displayed directly below the navigation on a theme which extends Luma I have added the following into my Magento_Theme/layout/default.xml but cannot see any results. The ...
0
votes
1answer
22 views

Add content of static block as new tab to product detail page

I created 3 static blocks with just a random headline for now, where I want to add html content later. the ids of the blocks are: warranty instructions certificates I then created 3 .phtml files ...
0
votes
0answers
19 views

Upload image from cms static block magento 1.9

When i save block after update or create new static block with insert image then no image add and it redirect to back page (static block page).
0
votes
1answer
33 views

Magento 1 : Unable to save the Static blocks on edit existing blocks

I have 1.9.0.3 Magento website, everything was fine, website wasnt edited in a year and when I tried to edit some existing static block and save or save and continue editing I am returned in CMS/...
2
votes
2answers
36 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: $...
0
votes
0answers
12 views

Ves Mega Menu block link

I have a block that I want to link to VES Mega Menu. but, I'm really new to use Ves Mega Menu and Magento 2 in genral. I know I can use the {{ store url="category_id" }} in the menu link, but this ...
2
votes
2answers
70 views

Static Block stylesheet is not applied in PWA

I have created one CMS block in my admin panel and want to display it on my PWA homepage. I have added below code in my RootComponents/CMS/CMS.js file. import React, { Component } from 'react'; ...
0
votes
0answers
14 views

How to update multilingual static blocks content programmatically in Magento 1

I've created 2 static blocks for 2 different languages. Both of them have the same identifier: identifier: privacy-policy (name: Privacy Policy EN) identifier: privacy-policy (name: Privacy Policy DE)...
0
votes
2answers
120 views

Magento2: WYSIWYG / TinyMCE Editor every time removing <a> tags in CMS blocks

I am adding HTML in CMS block editor but it keeps removing <a> tags from Html. Does anyone have a solution for this? Thanks
1
vote
0answers
18 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 ...
0
votes
1answer
32 views

Magento 2 : How to get static block as html content on frontpage?

As we know that we're able to render html content up in front as using below code echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('identifier')->toHtml(); ...
0
votes
1answer
23 views

Adding a static block messing up footer?

I am trying to edit the category page on my Magento 2.3 site. I use the pearl theme. I took out all the default text and pictures and called a static block. The static block looks how I want, which is ...
3
votes
3answers
207 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
0
votes
1answer
37 views

How to add static block in invoice PDF?

I am using Magento 1.9.3 I want to add a static block in invoice pdf. Can I load any static block? If it is possible then how I can do this?
0
votes
0answers
82 views

Magento 2 : How to get data from cms block into a js file

I have created a cms block in backend with the id wsmaterial. I have a modal that is created in a JavaScript file and the content for the modal should be the html from the cms block. Right now, it ...
4
votes
1answer
77 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
vote
0answers
40 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
71 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:...
6
votes
2answers
209 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/ ...
1
vote
1answer
28 views

Magento2 can't call custom phtml fail in CMS Static Block

I have tried many ways to call the custom phtml file in Static Block but none of them seems to work. My file is located - app/design/frontend/Magento/MyTheme/Magento_Theme/extra/test_view.phtml How ...
0
votes
1answer
33 views

Links in static block don't show or work

In my category I call a static block to left sidebar from category custom update XML <reference name="left"> <block type="cms/block" name="kat_maerke" before="-"><action method=...
0
votes
0answers
20 views

Is it a simple way to set conditions for widget of type CMS static block?

I want a CMS static block to appear in some product pages, but not all. The condition would be "brand is xxx", but unlike other widget types there is no condition option on Widget Settings. Is there ...
0
votes
2answers
368 views

Magento 2.3.0 - Add custom block after product description tabs

I've created a CMS block called km_product_page_short_description I want to call this CMS block in a custom block below the product description tabs (where the blue line is) as shown in the ...
1
vote
1answer
56 views

How to get current page url in static blocks

I want to get my current page URL in one of my static blocks How do I get that?
2
votes
2answers
55 views

I cannot change from Products only to Static block and products in Display Settings of an existing category

Working with Magento ver. 2.2.2 I wish to change the design of category pages. Now certain categories are displaying only products, But I want to display a static block and products. I create the ...
0
votes
2answers
30 views

How to call static block by xml to phtml without refrence

I want to call a static navigation block in topmenu.phtml I defined that in default.xml <block class="Magento\Cms\Block\Block" name="top_links"> <arguments> &...
0
votes
1answer
196 views

Passing variables to static block in magento2

I have used below code in magento1 to load the static block with custom variables. Here is the code of my m1 Block file. { $customer = Mage::getSingleton('customer/session')->getCustomer(); ...
2
votes
0answers
69 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.
0
votes
1answer
18 views

Am I hurting performance or using bad practice by including css within my static block?

When I create a new section for my home page or a block for a category header is it bad practice to include css within that block? My thought process is that when I want to remove or change that ...
0
votes
3answers
276 views

how to call phtml file in static block?

I have created phtml file, app/design/frontend/Smartwave/porto/Magento_Contact/templates/inquiry.phtml <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license ...
2
votes
0answers
113 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 ...
4
votes
1answer
122 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 ...
1
vote
1answer
189 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;...
2
votes
1answer
127 views

Magento 2.2.5: Blocks added to footer display in wrong order

I've been working on a magento theme, which inherits from Magento/blank, found at http://murkyapparel.com. As you can see, the footer looks a bit of a mess. I might make some changes, so here is a ...
1
vote
1answer
104 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 ...
2
votes
2answers
500 views

Magento 2 decode widget code in category description

I have added widget(call static block) in category description http://prntscr.com/ko816y.But it is not call widget in front just showing output as it look in admin WYSIWYG editor. So,I want to convert ...
0
votes
1answer
75 views

How to find html/script file on server or magento admin

I have a magento 1.9 e-com site - furnituretrader.com.au - and I want to change the url link to a section at the bottom, however I can't locate the html section on the admin panel or the file server - ...
0
votes
0answers
27 views

Previous customers name showing in cached static block

I wanted to build a static block in Magento where when a customer logs in they see there name with a welcome message (dependant on name length), however it appears on implementation that the previous ...
0
votes
2answers
145 views

How can i add static block in magento on category page?

I want to add a static block on my website Category page. This is the link of that page. https://flowerportal.in/online-flower-delivery/all-cities/bangalore I have just created some banners for ...
5
votes
2answers
399 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 ...
0
votes
2answers
467 views

Magento 2 Load Static Block In Controller

I tried the following solution:- Magento 2 Load - Block (CMS Static Block in Magento 1 terms) But getting some issue, you can visit here to see:- http://nimb.ws/oURqfV Here is my controller ...
1
vote
2answers
858 views

Injecting Variables into a Magento 2 CMS static block

Magento 1 Way :- https://inchoo.net/magento/injecting-variables-into-a-magento-cms-static-block/ I need the same in Magento 2, how can I achieve? it's urgent. Here is my afford:- <?php ...
0
votes
0answers
165 views

How to add Widget to all product details pages of a certain category in Magento 2

I would like to add a particular static block to all product details pages that are part of a particular given category. In the widget settings, I can see options to add it to the category page, or ...
0
votes
0answers
12 views

How to find out where specific static CMS Block is used

I try to improve the code of all static blocks, because the previous web developer was bad and coded spaghetti code. But how can I find out where a static block is used? The magento search function ...
0
votes
1answer
92 views

Content block with an argument

I have a number of products that share a lot of the same content. It is becoming increasingly difficult to keep all of the product pages updated when new products are released or changed. I would ...
1
vote
2answers
224 views

Loading custom phtml file in static block

I have a static block that I want to load a .phtml file from. I used this code after looking through stackoverflow, {{block class="Magento\Framework\View\Element\Template" name="custom_page" ...