Questions tagged [cms]
Denotes questions for the CMS section.
700
questions
0
votes
1
answer
1k
views
Magento 2 category as a static page
In Magento 2, I want One Category as a static page.
I don't want any products or filter or toolbar in it. Just need to load the content from the static block.
In, short I wanted to make one ...
3
votes
4
answers
2k
views
WYSIWYG editor inserting " instead of correct " in 2.3.0 when we use any anchor tags
I am facing an issue with Magento 2.3.0+ WYSIWYG editor inserting " instead of correct " and also when we write like <a href="{{store_url}}sales/guest/form/">Orders and Returns</a> ...
1
vote
1
answer
2k
views
Magento2 : CMS page images showing in admin but not on front-end (WYSIWYG)
My CMS images are showing in admin but not on the frontend for a content page (About Us) that I m making
Though the links look clearly wrongly pathed :-
https://www.giftshop.com/index.php/admin/...
0
votes
2
answers
2k
views
How to write conditional statement using {{if}} in the content of CMS page in admin side?
I want to show two different contents of a cms page (e.g. about us) in two different themes.
I know it can be possible if I create a template where I can have the theme specific condition and include ...
1
vote
1
answer
2k
views
Magento 2 : How to Remove Container Div From CMS Page
How to remove container block from cms page for particular layout. I have created new layout and apply on cms page but not able to customize it.
Below my custom layout code:
app/design/frontend/...
2
votes
2
answers
3k
views
Convert cms page content to html interpretation Magento 2
in my root.phtml, I can call for cms page content with :
<?php echo $layoutContent; ?>
but I wanted to use $cmsPage->getContent() instead :
<?php
$objectManager = \Magento\Framework\App\...
0
votes
1
answer
1k
views
WYSIWYG media directory contents removed
Yesterday a client of mine on Magento Community had all of their media from the /media/wysiwyg/ directory deleted. We assumed human error. Then today, another client on Magento Enterprise had the same ...
2
votes
3
answers
4k
views
Magento 2 : Check Static Block with same identifier in InstallData Script
I am creating module which will create static block & cms page at time of site transfer.
So my InstallData file like below :
class InstallData implements InstallDataInterface
{
/**
* @var ...
0
votes
1
answer
2k
views
Magento 2 : Show active link of cms page in customer account navigation?
I have added a custom cms-page link in customer account navigation. My custom link is showing in account navigation and working too, but it's not showing as active/current on click.
Cms-page > ...
6
votes
2
answers
3k
views
Magento2: How to add separate css file on each cms page?
Is it possible to add individual CSS file on each cms page? Upon researching, I can do it by adding code on Layout update XML.
Unfortunately, it isn't working. Here's my code:
<head>
<...
3
votes
2
answers
3k
views
Magento 2 widget doesn't show - how to debug?
I have a module that is installed in other sites. In one site it doesn't show up when inserted into CMS Pages.
{{widget type="Company\Modulename\Block\Widget\Test" template="widget/newsletter/test....
1
vote
2
answers
2k
views
Magento 2.4.3 CMS Page custom layout update
I am trying with no luck to update a layout to a specific page only to our Magento 2.4.3 store.
CMS Page URL key is:
product-finder
I have created in child theme folder this xml file:
app/design/...
2
votes
3
answers
2k
views
Magento2: How to create password protected cms page?
I want to create password protected page.
Where users once click on password protected page then they redirect to the password page. And then after filling password, they redirect on actual page ...
5
votes
1
answer
2k
views
Magento 2: Advanced Custom Fields for CMS Pages
As in Wordpress, we have https://www.advancedcustomfields.com/.
So in Magento 2 we have http://www.advancedcontentmanager.com/download-acm-extension-m2.html
It helps Customer/Client to Manage their ...
0
votes
1
answer
1k
views
Put a trailing slash at the end of CMS URL without redirection
I would to put a trailing slash at the end of my CMS URL, but without make redirection when it's possible : I want to put this slash when the URL is build.
In the BO, in CMS page, we can define url ...
0
votes
2
answers
2k
views
Notice: Undefined index: PK_CMS_PAGE in \vendor\magento\framework\EntityManager\EntityMetadata.php on line 96
I shifted my site from server to local. But it shows an error like this:
Notice: Undefined index: PK_CMS_PAGE in
\vendor\magento\framework\EntityManager\EntityMetadata.php on line 96
can ...
0
votes
2
answers
2k
views
Why changes in a CMS block doesn't appear?
I have a quite simple problem which I can't address.
I've been changing Static Blocks from CMS -> Static Blocks (e.g. a Prices page).
Once I change the Block and save it, my website doesn't seem to ...
0
votes
3
answers
3k
views
Magento 2 cms page cms page Identifier
How to get cms page FullActionName()
$request->getFullActionName() == 'cms_index_index'
Now,i want to get cms pages identifier name at that cms page
In Magento 1, I used this Mage::getSingleton('...
0
votes
2
answers
1k
views
Product List Widget
I tried to add product list widget to show all the products which have a special price but it gives me the following error.
Error filtering template: Notice: unserialize(): Error at offset 298 of ...
1
vote
2
answers
1k
views
Set default value on select of page layout in cms_page_form.xml
I would like to set a default value for the select on the page layout when creating a new cms page in Magento 2. The file I'd like to make an extension for is cms_page_form.xml under module-cms > ...
5
votes
0
answers
208
views
Magento 2 : Add Image Field on CMS Page
Here is my code
> app/code/Vendor/Module/etc/db_schema.xml
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
3
answers
2k
views
Is it possible to get system configuration value in Static block/ CMS page
I have eight static block list. Client want to change some part of string in these static block according the current month. I can achieve this though the code, but client have access only of backend, ...
3
votes
2
answers
740
views
Unable to save block changes using Page Builder in 2.4.5 EE
I'm Unable to save block changes using Page Builder in Magento 2.4.5 EE
Issue mostly found in google chrome, brave, edge all with windows operating systems.
however i tried to replicate the issue in ...
0
votes
1
answer
23
views
How to manually create a html link to another store view in CMS content?
I need to insert a link to CMS content that will point to the same site's different store view. How can I do that?
0
votes
0
answers
24
views
Hide the Cookie Banner on certain pages
I have a product widget page which I put in an iframe of an external site.
I need to deactivate the cookie message for this, suggestions?
0
votes
1
answer
19
views
How to use plugin for Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\Thumbnail execute() function
I want to put an around plugin.
This is the core file
vendor/magento/module-cms/Controller/Adminhtml/Wysiwyg/Images/Thumbnail.php
The main purpose is on the execute function I want to upload a custom ...
0
votes
0
answers
13
views
Magento 2 How to write plugin for getImageHtmlDeclaration function
This is the original path - vendor/magento/module-cms/Helper/Wysiwyg/Images.php
I want to put a plugin for this function getImageHtmlDeclaration()
I want to pass different HTML tag
if (!$renderAsTag) {...
0
votes
1
answer
282
views
Magento 2 How to upload mp4 and gifs in wysiwyg
Hi I am trying to upload MP4 or GIFS in wysiwyg. But when I try to upload it I am getting the following error:
For MP4 "We don't recognize or support this file extension type."
For GIFS &...
-1
votes
1
answer
36
views
getting blank page after creating custom layout
I have created custom layout as below
created 3-columns-double-footer.xml file inside Magento_Theme/page_layout folder
<?xml version="1.0"?>
<layout xmlns:xsi="http://www....
0
votes
0
answers
124
views
Magento2 Static Block Widget Renders As Raw Code Instead Of HTML
I have a CMS-created page where I used the "Insert Widget" option to insert a static block into the textarea field, which ended up as:
{{widget type="Magento\Cms\Block\Widget\Block"...
1
vote
1
answer
355
views
Adding new WYSIWYG text style or format
I would like to add a new WYSIWYG text style, similar to the below image.
As per the official documentation, I have managed to add a new style called "Introductory Paragraph": https://...
1
vote
2
answers
1k
views
Change magento2 cms page layout
I am using 2 column left in home page. It is a cms page. In responsive i need to load as
<div class="sidebar sidebar-main"></div>
<div class="column main"></div>
1
vote
1
answer
22
views
bundle product not creating from admin cms
Error:Stock with id "1" doesn't exist
1
vote
1
answer
177
views
Remove content when CMS page is viewed?
Magento 2.4
Is it somehow possible to remove parts of the content of a CMS page before it is shown to the user? Is there a renderer I could overwrite?
Example: The content of my CMS page is this: ...
0
votes
2
answers
728
views
Magento 2 - Add button to the Header links
I am trying to add a button called "social media" to be beside the Storeview switcher.
I tried to follow the answer in: Magento 2 - Add a Custom Button to header.phtml
So I created a CMS ...
14
votes
3
answers
13k
views
CMS and Block content warning Magento 2.4.2
Does anyone have any information or details on the following warning that I am seeing in the 2.4.2 CMS and Block content areas on saving?
Temporarily allowed to save HTML value that contains ...
2
votes
1
answer
1k
views
Disable Cache in CMS Page Using a Custom Module
I created a module which is an observer to listen to an event which is triggered on a CMS page and after listening to that disable the cache of the CMS page. My problem is how to have connection ...
2
votes
2
answers
2k
views
Call of my custom module in a CMS Page not working
I am working on a quotation form module I would like to implement on my Shop Home Page
My config.xml is (app/code/community/Mine/Quotemodule/etc/config.xml)
<?xml version="1.0"?>
<config>...
2
votes
3
answers
7k
views
How to check whether a block exist ( based on its type )
This really confuses me !!
I came to a situation, where I need to create a new block (core/template block) programmatically, if there is CMS Block present in a page layout. In general case, according ...
5
votes
2
answers
17k
views
How do I modify Magento rendered page before it's displayed?
I am trying to modify the rendered page content before it's displayed to the user. I would like to do this in my custom module.
So far, I have tried hooking into the cms_page_render event but:
it ...
7
votes
1
answer
10k
views
Adding custom fields in the cms - Magento
I am new to Magento and I have some static pages that I am trying to integrate into the CMS.
I have been looking for days for a way to add custom fields to the CMS in a similar way to how Wordpress ...
2
votes
2
answers
1k
views
Magento 2 How to create CMS block with HTML content programmatically
In Magento 2.4.x, How to create CMS block with HTML content (Text, Image with div structure) programmatically in Page builder section?
6
votes
1
answer
20k
views
Magento include phtml file within another phtml file
I am making a custom home page for my magento website in a phtml file named home_banner.phtml, which in turn i have referenced in the CMS->Pages->Home Page content by the following code
{{block type="...
5
votes
2
answers
10k
views
How to create a new page without using CMS?
Is there any way to create a new custom web page without using the Magento CMS Admin panel?
I'd like to create a new web page (let's say newsletter) using the 1 column layout. But I would like to ...
1
vote
1
answer
366
views
Adding layout handles to blocks in cms pages
We have a cms page with a content like this:
<p>Lorem Ipsum</p>
<div>{{block class="Vendor\Module\Block\Feature" block_id="feature_wrapper_block"}}</div>
&...
1
vote
2
answers
252
views
how to add cms block in magento without using our own theme and in app/code?
How to Add CMS Block in Magento2 programatically.
I want to add a cms block in app/code insstead of app/design using layout or xml files.
1
vote
1
answer
189
views
Magento2: url redirection in controller_action_predispatch observer with setting post parameters
I am working on cms page restriction for specific customer group.I am using controller_action_predispatch event observer to check whether the current page is set for restriction and the current ...
0
votes
2
answers
902
views
Unable to Login to Magento 2.4 Admin Page in localhost
As the title states, I am unable to log in to the default admin user in Magento 2.4 after installation using composer.
I have tried changing the password through PHPMyAdmin using the following command:...
0
votes
1
answer
226
views
Using a block markup tag strips out elements of block created in pagebuilder
When I create a block with pagebuilder that includes background images for the rows, image elements and buttons they all get stripped out when using the {{block id=''}} tag on another page
There is ...
0
votes
0
answers
34
views
Magento 2.4 how to upload image for spcific node in hierarchy
Does anyone have experience how to upload an image for each individual node?
I added the added input field via the plugin to the form. I would also be very grateful if anyone could have a solution for ...