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
1
vote
2answers
2k 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 ...
1
vote
3answers
2k 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,...
1
vote
2answers
4k views

Magento 2: how to add a block in cart under cart summary?

It's possible to use a widget to insert a block inside the cart summary (at the bottom). However I'd like to add a block under the cart summary. I've already created a custom theme which inherits ...
1
vote
1answer
1k views

How do I hide a static block on one of my category product pages?

On all my product pages just below the main product images I have a static block called "block_product_img_bottom", which contains a small image. All but one category must display this image, so how ...
1
vote
3answers
3k views

Show content of phtml file on static block Magento 2

I have the code (details below) that basically generates links and images for a categories sub-categories. It is working in Magento 1.7 - we are moving to Magento 2 and I would like to get it working ...
1
vote
1answer
262 views

Magento 1.9.1 Static Block not visible in Front End

I have created the static block in cms/static blocks Then added the following code to catalog/product/view.phtml <?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘...
1
vote
3answers
2k views

Retrieving title of static block without getModel()

I have a setup where I am running a multi store system but I need different frontpages for every store. So I got my phtml-template sitting around and getting dynamically filled. Now I added three ...
1
vote
2answers
4k views

Magento base url static block

I Have Cms Page I want to add contact us block withing it so I do as follows <!– CONTACT FORM CODE BEGIN–> {{block type="core/template" name="contactForm" form_action="/~argentaustcom/contacts/...
1
vote
1answer
205 views

Static block issue

I created 2 static blocks called "message". i want to show one on each store i have. After configuring it correctly im facing an error when i call Mage::getModel('cms/block')->load('message')->...
1
vote
1answer
4k views

Static Block Not showing up on left sidebar of CMS pages

1). I am having problem in displaying Static Block on CMS pages Left Sidebar. My Settings: CMS Page -> Design -> Layout -> 2 columns with left bar Layout Update XML: <reference name="left"> &...
1
vote
1answer
379 views

Magento2 : How to add social link in static block in PWA

I have created one Static block with added below content in and I need to add social links in PWA. <a class="footer-facebook" href="https://www.facebook.com/" target="_blank" rel="noopener">...
1
vote
1answer
3k 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
760 views

Adding new attribute to static block(cms/block)

Greetings StackExchange. I'm not quite sure whether this has been answered before or not. I have done a fair amount of blog / thread searching on this problem/topic. Is there a way to add a custom ...
1
vote
1answer
1k views

how to display recently viewed products on homepage in magento 1.9.3.3

{{block type="reports/product_viewed" template="reports/product_viewed.phtml"}} <?php if ($_products = $this->getRecentlyViewedProducts()): ?> <div class="block block-list block-viewed"&...
1
vote
1answer
102 views

Specific block not rendering inside of a static block

Works fine in a CMS page. But I need to render this block in a static block: {{block type="catalog/product_list" category_id="37" template="tm/quickbuy/catalog/product/list.phtml”}} The block ...
1
vote
1answer
946 views

How to allow static blocks in product description?

I'd like to add static blocks like {{block type="cms/block" block_id="this_is_the_block_id"}} in the product description (and/or short description). We currently have an Magento CE 1.9 ...
1
vote
2answers
1k views

Magento : How to Customize Product Custom Options

I need to display my product's custom options in front end, in specific way. For example, I would like tabulate in two columns, drop down fields of my custom options and add some header text on ...
1
vote
1answer
238 views

What is Mage_Catalog_Block_Product ? Is it the path of price.phtml?

I need to call $this->getPriceHtml($_product, true); to my newly created block. I called the product image, name and etc... but I didn't able to call the price. Here is the code. <?php $...
1
vote
1answer
2k views

how do get id in block magento2?

in magento2 Admin cms/page i have call like, {{block class="Mageaddons\Slideshow\Block\Slideshow" template="slideshow.phtml" slideshow_id="1"}} but in block i run $this->getData('slideshow_id'); ...
1
vote
1answer
993 views

Magento: create static block from Product Filter

I want to create a static block of the default Magento Filterable Product Attributes, like in the picture below. The problem is not in creating the static block. What I don't know is how to have the ...
1
vote
1answer
255 views

Widget Locations & Static Blocks (not working)

As you can see in the image above I have created a widget that will display on a specific page which I defined and created the static block that the widget will load. But I am only able to load the ...
1
vote
2answers
1k views

Move static block category

I want move static block landing in Category. I found code in file /app/design/frontend/base/default/template/catalog/category/view.phtml <?php elseif($this->isMixedMode()): ?> <?php ...
1
vote
2answers
910 views

How do I add a static block to 1column, 2columns and 3 columns all pages?

I created a static block that I want to add in all of the 1,2,3columns pages from pages. Where should I include this xml code? <reference name="content"> <block type="cms/...
1
vote
2answers
843 views

Limit products in CMS block

I try to limit the number of products shown in a static cms block as follows {{block type="catalog/product_list" name="product_list" category_id="4193" limit="4" mode="grid" template="catalog/product/...
1
vote
2answers
1k views

I get code while displaying terms and conditions in checkout onepage

I created a terms and conditions page via Sales > Terms and Conditions, I created a terms page and content as {{block type="cms/block" block_id="terms"}}. I also created static block from CMS >...
1
vote
1answer
605 views

can phone number appear in the left side of the header in homepage and in the right side of the header in the categories page?

I have created a static block in magento in which i have inserted the following code in order to get the phone number information {{config path="general/store_information/phone"}} I am also ...
1
vote
2answers
797 views

Show table in CMS Block [closed]

Does anyone have a script to pull a table from an external database to load into a CMS block? I have a database separate from Magento (a client list) that needs to populate a CMS block.
1
vote
1answer
493 views

Adding a static block below product listings

I want to add a static block below product listings, this is mainly for SEO purposes, we would prefer to do this in admin if possible as opposed to the back end on the server. We are retailers NOT ...
1
vote
1answer
2k views

Footer empty, static blocks not showing up

Good morning, it seems my footer content has disappeared and I don't know where to. I want to put the newsletter module in there, but it completely vanished. here's the code that I added temporarily ...
1
vote
2answers
2k views

how to control these static blocks?

I am a newbie in magento, it seems to be an easy question but i spend hours still cannot figure it out.. I installed the sample data for Magento1.9 (attached), the bottom blocks (title in blue color) ...
1
vote
2answers
2k views

CMS block not saving code

I am trying to edit a simple static block in Magento 1.9.0.1. The static block is the main page of the Ma-Cance theme. When I try to add a <p class="img5"></p> to the static block, and ...
1
vote
1answer
1k views

Static block link cuts part of the url

I have a static block in which content I have this code: <a href="/de/sale">something</a> The url of the project is dns/my_installation/..., so my point is that when I click on the block ...
1
vote
3answers
813 views

show a static block just when visitor's GeoIP is from GB

I need to change the content of a static block in magento for visitors from some special countries. This is the JavaScript embedded into the Magento: <script src="http://j.maxmind.com/app/...
1
vote
2answers
1k views

how to add 2 static blocks to a category page

i have a staic block called "sub categories" and i have this set to all my parent categories so when you click on them it shows the sub categories. However i also want to add another static block to ...
1
vote
1answer
1k views

How to Dynamically set a CMS Block's Title?

We have a custom CMS type page that is added from the Category settings. Created at /neon-signs/custom-neon-signs.html Under that category setting, we set the URL Key and then also assign a CMS Block ...
1
vote
1answer
116 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
4answers
553 views

Magento2: Pagination on listing page using static block

I have added a static block in the category Static block content: Category : It shows all the products on a page. toolbar not showing: How can I add the toolbar:
1
vote
1answer
59 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 ...
1
vote
1answer
25 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
46 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="...
1
vote
1answer
646 views

Insert block before footer in single page cms

I need to insert a block before the footer in single page cms (magento 1.9). I tried to do it by using layout. I have added below code in my layout file : <reference name="footer"> <...
1
vote
3answers
2k views

Add custom block before main content only on the contact page

i would like to add a static block between the nav menu en the content so i can give it the full width of the page. This block must only be visible for the contact us page. System: magento 2.1 ...
1
vote
1answer
391 views

Add Static Block Above Content On Every Page

I'd like to add a static block above the content on every page. I've tried adding these to my local.xml but the block appears in the wrong place: <default> <reference name="top.links"&...
1
vote
1answer
574 views

Magento 2.2 Not Loading theme and blocks

I have created a magento 2.2 application using composer. Everything working fine with Luma Theme. Next Step I need to extend the template. app / design / frontend /< Vendor name> / < Theme ...
1
vote
1answer
651 views

Creating static block by custom module magento2

How to create a Static block for custom module creation in magento2 Thanks
1
vote
1answer
3k views

Adding a new container to Magento 2 header-wrapper for main navigation

I'm trying to add a new container to Magento 2 and have a main navigation menu displayed in here (which I've created as a frontend block) then trying to add it to my own container where I can add a ...
1
vote
1answer
40 views

M2 Add a block to the contact page

I have created a block which contains my company name, address, telephone etc. How can I add this block to my contact page http://www.extenderstore.com.au/contact/ ? I would like it located under the ...
1
vote
1answer
35 views

how to call custom block in magento

How to call custom block in header any help will be appreciated . <referenceBlock name="logo"> <block class="Magento\Cms\Block\Block" name="help"> <arguments> ...
1
vote
1answer
830 views

Can I add extra fields to the a Magento 2 static block?

I'd like to add something similar to a category drop down to Magento 2's static block. Is this possible, if so can somebody set me off in the right direction?
1
vote
1answer
152 views

moving static block 'out of container'

I am currently using Magento 1.9 and the Bootstrap boilerplate. I have already put the banner slider in a static block. Is there any way to move a static block out of the container to below the menu?...

1 2 3
4
5
10