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.

2
votes
0answers
19 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
16 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
41 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:...
3
votes
2answers
152 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
23 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
30 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
1answer
16 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
49 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
33 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?
1
vote
2answers
32 views

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

Working with v. 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 static block ...
0
votes
2answers
26 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
78 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
52 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
17 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
87 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
95 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
48 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
108 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
74 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
79 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
243 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
57 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
24 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
109 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
388 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
272 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
470 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
115 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
11 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
47 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 ...
0
votes
2answers
194 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" ...
0
votes
5answers
279 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 ...
1
vote
1answer
22 views

Magento 2 :: Creating and Customising home page

My client wants to have a custom editor so that they can edit or add images, videos blocks over homepage. What can be the best approach to do this? He might need slider, special products slider, ...
1
vote
1answer
630 views

add static block on top of header

I am trying to customize Magento top header with some custom static block and also want to change and relocate existing link and icon like wish-list. I created static block for top-header social ...
1
vote
1answer
21 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, ...
0
votes
0answers
30 views

Magento 2 - Single page with content only

The store is configured with multi-store. Default Asia Middle East On Default page, there is just the content with 2 links (i.e Asia & Middle East). Once a user clicks on Asia its redirect to ...
0
votes
1answer
769 views

Magento 2 - Error: pub/media/wysiwyg is not under storage root path

I facing this error when uploading images in static blocks. Can anyone suggest me, why is this happen?
0
votes
2answers
67 views

Add a static block right under the main navigation, not wrapped in a widget, full width

I'm using Magento 2 with Luma theme, and I'm trying to add a block on the home page only, right under the main navigation, and I want to do it without any margin or padding, full width, basically not ...
1
vote
3answers
462 views

Magento 2 Content blocks and pages won't load

Ground floor beginner here. Fresh M2.2.3 install, the first thing I did was to change to production mode. I did these steps: opened app/etc/env.php Set 'MAGE_MODE' to 'production' Cleared all cache,...
0
votes
1answer
16 views

How do i create a cms static block showing image and text (inline or beside it) with a link to a product or category

How do i create a cms static block showing image and text (inline or beside it) with a link to a product or category just like the luma static block on home page. I tried to edit the text on the luma ...
0
votes
1answer
158 views

Magento 2 - Check if static block is enabled

On my Magento 2 store I have a static block that outputs a message to inform customers that the prices are not currently available. On my template files I'd like to wrap the prices and Add to Cart ...
0
votes
2answers
57 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
52 views

Extract image from echoed block

Is it possible to echo a image / images from a static block? So something like this: echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($optionText)->getImages()
0
votes
0answers
11 views

How can set static block or widget positioning top to down in magento2

I want to customize the home page and insert widgets. But it goes to above footer. I want to set in the middle. How can I customize from admin panel? Or Where can I customize homepage in magento2?
0
votes
0answers
325 views

Magento 2.2. - Show subcategories on category page

After searching online, I found this approach to my problem of showing subcategories inside the category page. The above solution states to create a custom module, and then reference it with a cms-...
0
votes
0answers
110 views

Magento 2 Custom Pagination is not working for category block

I make static block module for listing sub category (with image) of current category. It is working well. but when i am unable to implement pagination in this listing page. After I tried to implement ...
1
vote
1answer
37 views

Mage 2.1.1 short codes front end rendering

I'm new to Mage 2 but familiar with M1. This is a M2.1.1 site I'm attempting to output a static block in the product description by entering short code in the wysiwsyg editor like so: {{block class="...
0
votes
1answer
21 views

Created Static Block Successfully if i clicked the block it will redirect to Category Page

inside href what should I do?.<a href=""><p><img src="{{media url="wysiwyg/xyz.jpg"}}" alt="" /></p></a>
0
votes
1answer
54 views

How to hide text on mobile view within Static Block

I'm currently working with a static block on our website. I'm trying to hide certain pieces of texts within this block when viewed on mobile. I've come across some answers which use CSS. However, I ...
0
votes
1answer
91 views

TinyMCE - Update Validation Config Settings to allow <div> inside <a>

I have an issue where TinyMCE is removing my links in my static CMS blocks. I believe this is because the anchor includes div's which doesn't meet the validation for TinyMCE. How is it possible to ...