A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [cms-block]

Denotes questions related to CMS blocks.

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

Magento2: Contact us CMS block not showing up

I'm working on a Magento 2 template, based on Luma and I've run into an issue with the Contact Us page. The content of the CMS block (contact-us-info) isn't showing up in my template. All I get is ...
1
vote
1answer
992 views

CMS block not showing up on front end

I am new to Magento, but building my first site in Magento 2. I have created a block in the CMS, and added it to my override/base/default.xml file like so; <referenceContainer name="footer-...
0
votes
2answers
582 views

How to sort collection of CMS blocks

Is there a way to sort a collection of cms blocks? I need to sort blocks by identifier. I tried to do it similar to a collection of products: $collection = Mage::getModel('catalog/product') ->...
3
votes
1answer
640 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
416 views

Magento2 Multiple Blocks returns same object

{{block class="Class_path" name="xyz" template="Package_Module::file.phtml" id="6"}} {{block class="Class_path" name="xyz" template="Package_Module::file.phtml" id="7"}} {{block class="Class_path" ...
6
votes
1answer
2k views

Magento 2: Get WYSIWYG editor's data in frontend?

I add wysiwyng editor in admin Ui form. <field name="content"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="...
2
votes
1answer
44 views

How to Refresh image shown in home page by static CMS with same name and location

I have a CMS block that shows three images, top.jpg, mid.jpg, and bottom.jpg. The CMS block contains: ..and so forth.. My idea was to keep the same names so someone in charge of the ...
0
votes
1answer
380 views

Upload and Browse button missing in CMS WYSIWYG on Magento v1.9.21

I have an issue where you upload an image via the CMS Pages and the Browse and Upload buttons are missing. I have tried following without any success ; added back in the SWF files that are removed ...
1
vote
1answer
82 views

How to HyperLink block_name on any block or Product Slider Name Title

When using the code below, it shows feature product slider on any CMS page with the title that is a value of the block_name attribute. It's shown as a plain text, but I want to make it a hyperlink. ...
0
votes
0answers
213 views

Get a list of sub-categories of parent

Issue I would like to populate a CMS static block with a list of sub-categories of the parent category, separated by the first letter of each sub-category. The desired result Brands (A) Adidas, ...
1
vote
1answer
184 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
1answer
164 views

Magento 2 : How to Fetch Cms Block Count

I want to fetch CMS Block count using identifiers in phtml. How is it possible?
1
vote
3answers
5k views

how to disable cache for particular Static Block in magento 1.9 [duplicate]

I have a static block i reuse on different pages and when I call this block I'm 'feeding' it 4 product SKU's, different SKU's for different pages, its like a specials/promotion block. However, when I ...
1
vote
2answers
785 views

Magento : How To Add an Attribute to Static Block

How to add attribute to static block. I am not looking for code, but also where put code. Assume attribute is named test and static block name sttest. I have search on this, but always get lost on ...
0
votes
1answer
463 views

Load static CMS block with directives

I created a block under CMS -> Static Blocks with the following content: <a href="http://www.foo.com"> <img src="{{media url="wysiwyg/email/751-footer.png"}}"/> </a> ...
3
votes
2answers
14k views

Magento2 contact form in CMS page

in magento 1.x for add contact form in CMS page i use next code {{block type="core/template" name="contactForm" form_action="{{store direct_url='contacts'}}/index/post" template="contacts/form.phtml"}...
2
votes
2answers
5k views

get cms block title magento2

In my custom theme I have placed a cms block in a .phtml file like this: <div class="data item content" id="footer-impressum-tab" data-role="content"> <?php echo $block->getLayout()-&...
1
vote
2answers
5k views

magento 2 : how to use phtml in cms static block

I want to make a cms static block which should display/render the content of a .phtml file (echo "Test1"). Content of my cms static block: <div id="something"> {{block class="Magento\...
6
votes
1answer
8k views

Magento2 images in CMS block [duplicate]

I have an image in: /var/www/html/app/design/frontend/Alothemes/milano/web/images/natale/IMG_7300.JPG How can I refer to this image in CMS block? I know I should use: <img src="{{media url="..."}...
4
votes
1answer
5k views

Magento 2 - How to add or insert PDF file in a CMS page?

Do you have an idea on how to add or insert a PDF file in a CMS page or CMS block in Magento 2? Correct me if I'm wrong for the question title for this thread.
4
votes
3answers
7k 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 ...
2
votes
1answer
1k views

Add a static block through xml to a specific cms_page?

From a previous question I learned how to add some static blocks to the CMS homepage like this: how to achieve this 2 columns page layout? The xml is created in: app/design/frontend/<Vendor>/&...
1
vote
1answer
978 views

Magento 2 How to get Product details in CMS block using product id or SKU?

How to get product details in CMS Block using product Id or SKU in Magento 2.
0
votes
1answer
128 views

static block (created via admin panel) the same as a php Block class in a module?

Magento 2 related Question. Is a block(CMS Static Block) which I create via the Admin Panl, the same as a block which I created programatically in a module (app/code/Vendor/Module1/Block/Bla.php) ? ...
0
votes
1answer
47 views

Will removing themes and modules speed up magento

I am using a purchased theme for my website and it contains about 14 different themes. I have picked out bits and pieces of all the different themes to create my own child themes and now the others ...
1
vote
1answer
813 views

Magento 2 How to Add CMS Block to Email Confirmation Email

In magento 1 we can add CMS blocks like this {{block type="cms/block" block_id="my_block"}}, I've tried this in Magento 2 but does not work. Is there a way of adding a CMS into an email template? For ...
1
vote
3answers
2k views

Magento 2 : Call Static block wysiwyg images not using editor

Any one have idea for how to call images in Static block not using editor like {{media url="wysiwyg/demo.jpg"}}?
2
votes
1answer
5k views

WYSIWYG / TinyMCE Editor keeps removing <a> tags in CMS blocks in Magento 2

I'm trying to add a link to each div but whenever I save the block, the <a> tags gets stripped out. Any help would be appreciated <div class="banner-pods"> <a href="http://www....
4
votes
1answer
3k views

Magento 2: How to call CMS Block in email templates?

In Magento 1, we can call CMS Block in email templates like that: {{block type="cms/block" block_id="mail_include_header"}} I try above code for Magento 2, but it does not work. How can we call CMS ...
0
votes
1answer
614 views

How to create a cms block with existing block content using widget in Magento 2?

Is it possible in Magento 2 to create a new cms block(using widget) with content of an existing block, and admin can change the images, links and text of new block???? Actually, I need a template(...
0
votes
2answers
317 views

How to restrict magento footer content to get cached

I don't want footer content and static blocks to get cached due to presence of some dynamic content in it. How Can I do it from code.
0
votes
3answers
1k views

block type=“core/template” template=“template.phtml” for specific category

I'm using a cms block as homepage's new products. In this block I can choose from which category it show me products ( from all categories, only from category n°1, only from category n°2 ecc. ) I ...
2
votes
2answers
429 views

Magento 2.1 :- CMS Page and Static Block

Here one issue in my magento 2.1. I create one di.xml file for my own module but i got error in cms page and static block. Check below image for cms page and static block error. CMS Page:- Static ...
1
vote
3answers
1k views

Loading CMS blocks with 'status' set to 'disabled'

Trying to load a block for a store $cms_block = Mage::getModel('cms/‌​block')->setStoreId($‌​storeId)->load($block‌​); and printing it I obtain two different arrays. If the block is enabled ...
2
votes
2answers
503 views

Update CMS Blocks Status Programmatically issue

I have created a cron that in configured date enables or disables some CMS blocks. It works fine only for disabling action and not for enabling. It's so strange because I call the same method: Mage::...
0
votes
1answer
51 views

Programmable Blocks give input variable

Im currently trying to get some kind of rich snippets onto my cms blocks. For displaying the rich snippet I would like to add a block. This block needs to be able to receive some data from the current ...
1
vote
2answers
931 views

How to call CMS block

I've created a widget, this widgets has a CMS block chooser on the block class I have the following function: public function getCmsBlock() { $blockId = $this->getData("block_id"); $...
1
vote
1answer
2k views

Magento Blocks Permission in Admin Dashboard

I saw this option in store admin of Magento 1.9 by going to System - > Permission -> blocks. The questions is: - How do I use it? - I have third party extension where is displays recently added blogs. ...
1
vote
1answer
163 views

Including newsletter block in a static block issue

I tried to include the newsletter block in a static block content, like: {{block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"}} But it is not working. Can ...
1
vote
1answer
88 views

Inserting multiple CMS blocks into a product collection

My objective is to allow CMS blocks to be added to a category's product collection at various places via the visual merchandiser. I created a custom table which is similar to catalog_category_product ...
13
votes
3answers
10k views

How to add a CMS block programmatically in Magento 2?

I need to add a CMS block via an install/upgrade script. I've already figured out how to add "normal" CMS pages as seen in the script below. But since I can't find any way to add CMS blocks in Magento ...
0
votes
2answers
718 views

Add CMS Block to product view and category page

What is the best way of adding a CMS Block under the breadcrumb on a product listing page and a different one on a product view page. Magento 1.9.
0
votes
3answers
389 views

How to associate a static block with attribute values?

I want to create an multiselect attribute with 3 values. When I select the values during product creation It should display the content from the static blocks. So I entered the identifier of the ...
0
votes
3answers
118 views

Add static block into “home” category from backend

I saw that in possible add a static block from the category management into Magento backend as you can see in picture I tried to add the static block and to display it but it doesn't work. I want to ...
2
votes
1answer
1k views

Magento 2 CMS block and CMS page store change programmatically

I had migrated data into magento 1.X to 2.X. In the migrated website I have around 2000 pages+blocks so I have to set all CMS blocks and CMS pages in all stores. Give me a better solution .
4
votes
2answers
788 views

Magento 2.0 Call cms page in phtml file

I have created one CMS page brand and I want to call brand CMS page in phtml file. So how can I call the CMS page? I got following code but it's not working. $cmsPage = Mage::getModel('cms/page')-&...
0
votes
3answers
116 views

custom phtml code not working in cms home page

here is my code which i have used in cms home page and created phtml in app/design/frontend/theme/template/catalog/product/displayed.phtml {{block type="catalog/product_displayed" name="...
3
votes
0answers
30 views

Custom Attribute listing

Hello I have created one custom attribute "Brand" with select box and add lots of brand for product. Now I want to display brand value with alphabets order in cms page.
1
vote
1answer
84 views

Magento Extension Page Layout

I've installed a news extension but I don't succed to customize layout. For all other pages, I've the category and inside I call the cms static block to uniform all the layout.. Now instead with this ...
0
votes
1answer
261 views

How to modify the number of articles displayed on the homepage?

I have a question regarding the CMS pages of the Magento RWD theme. I use the version 1.9.2.4 of Magento. 1- I added blocks and templates to call the categories in the "Madison Island" pages of CMS. ...