Questions tagged [cms-pages]

Denotes questions related to CMS pages.

Filter by
Sorted by
Tagged with
10
votes
4answers
985 views

how to setup noindex,follow in a static page in magento2?

I would set the robots meta tags to "noindex,follow" in a static page. For Magento 1.9 I used to do it like this: <reference name="head"> <action method="setRobots"><value>...
8
votes
1answer
496 views

Magento 2.1.x EE (Enterprise Edition) - How to enabled and access cms page versioning

Hi i am working on Magento 2.1.x EE and reading the devdocs i got to know magento ee has cms page versioning functionality Where we can preview/publish version wise cms page and we can also track ...
7
votes
3answers
3k views

Sitemap.xml change home

On our Magento store the sitemap which Magento automatically generates from the admin panel at Catalog > Google Sitemap adds the home url to our homepage like: <url> <loc>http://our-...
6
votes
2answers
4k views

How to add custom link in main menu in Magento 2?

I want to add CMS pages and Contact page link in the main menu. How to add these links in the main menu and their submenu as well?
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="...
6
votes
3answers
1k views

How to include module's CSS in CMS pages with module block

I have prepared one module in which I have prepared two .phtml files and included css and js through module layout file. Now, I want to include those .phtml file in different blocks and pages. I have ...
6
votes
3answers
500 views

How to add on scroll animation in magento 2 using AOS (Animation On Scroll) Jquery?

I have tried to add on scroll animation in my Magento 2 cms page. I used AOS Jquery for that. I have added the js and CSS file and initialize AOS through cms page but It will shows Uncaught ...
6
votes
2answers
7k views

URL Rewrite: From category to CMS Page

I've created a CMS Page. URL Key = about/page1. I've created some Categories. One of them, category #1, it's called about. URL Key = about and its first subcategory, category #2, is named Page ...
5
votes
2answers
3k views

Magento 2 : Add Hero Image Upload Field on CMS page

How to add image upload field to a CMS page and show this on top of my CMS page as Hero image like shown below? Maybe there are simple solutions/tutorials, but I can't find right one.
5
votes
3answers
219 views

Prevent CMS page availability on base URL

I have an issue in a Magento 1.9.2.2 store that I can't quite figure out the solution for, so i was hoping for your assistance. There are 2 different store views each serving a different language. ...
5
votes
1answer
81 views

How to preview a cms page in Magento 2 admin panel

Is it possible to preview the CMS page before push live? I can't preview my page while creating a page on cms page in admin panel Magento 2. How can I preview?
5
votes
4answers
5k views

Magento 2 Export & Import CMS Blocks and CMS Pages

How to Export and Import CMS Pages and Static blocks ?
5
votes
3answers
1k views

Magento Show Specific product on cms page

I want to show two configurable products on a cms page. The two products are under a sub category (id = 343). I've used below code in my cms page: {{block type="core/template" name="home.catalog....
4
votes
2answers
2k views

How to retrieve variable from CMS page in Magento 2

In Magento 1.9.x, we can do it like below In CMS page, add content: {{block type="core/template" name="..." my_vars="123,456" template="path-to/test.phtml"}} Create path-to/test.phtml: <?php ...
4
votes
2answers
4k views

How to add a static block on all pages on Magento 2

I want to add a static block on the left side of all pages. Can anyone tell me how to do that?
4
votes
1answer
4k 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
5k views

Magento2 Something went wrong while saving the page

I have problem with creating new page from backend it shows me this message: Something went wrong while saving the page. I can edit and save the page but I can't create the new page. any idea??
4
votes
2answers
763 views

How I can disable cache for one file that include in cms page?

I have including of phtml file in cms page (home page) {{block type="catalog/product_new" product_ids="6747,4652,605,571,518,182,4432,4425" template="catalog/product/home_slider.phtml" }}, and I need ...
4
votes
2answers
766 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')-&...
4
votes
1answer
1k views

add to cart button in CMS page

In Magento2.1, I'm able to load a product in CMS page using: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get('Magento\Catalog\Model\Product')-&...
4
votes
4answers
7k views

Magento2: How to add different custom css file on specific CMS pages

I tried so may things but unable to add the CSS & JS files for each Static CMS pages. I know if CSS can be added in cms_page_view.xml but this will reflect in all pages. is there anyway to add ...
4
votes
1answer
351 views

How does the CMS page admin form data provider gets its data?

Long story short: The CMS page admin form data provider class Magento\Cms\Model\Page\DataProvider, more specific the method getData always returns an array with a single element that contains the data ...
4
votes
1answer
543 views

Extending magento 2 breadcrumbs through XML layout

Is there any method to extending magento 2 breadcrumb through XML layout in cms page in order to add parent page link?
3
votes
2answers
13k 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"}...
3
votes
4answers
4k views

magento 2: display cms static page content in phtml file

I have a static cms page. I want to display that page content in my phtml file. Is there way to do this by using that page identifier? I did something like that for cms blocks. echo $block->...
3
votes
4answers
5k views

Magento 2 : Add custom js to a single CMS page

I am trying to add custom js to a single CMS page in Magento 2.2.5. Here is what I got: I have put the rellax.min.js file at :/app/design/frontend/TemplateMonster/md/web/js And I want to use that ...
3
votes
3answers
1k views

How redirect the “no-route” cms page to home page after 10 second (not through server side)

How would be possible using js (in admin,cms-page) to redirect the 404 page to home page?
3
votes
1answer
4k views

Magento 2-How to link image to category page through cms page?

I have a static page of shop. On this page there are different images. I want to link these images to the specific categories types. For example i have an image of men's clothes. Now i have also a ...
3
votes
1answer
1k views

How to overide ui component form in magento 2?

I want to add a custom field in cms page form in admin side. cms_page_form is created by using ui component form. How can I override this form in my custom module?
3
votes
5answers
8k views

How to redirect a category page link to CMS page link in Magento 2

I want to redirect my category link to some cms page. Could anyone tell me how to do so? Any help will be appreciated. @Kho TruongDinh As you specified, I have used URL rewrite, but it did not work ...
3
votes
1answer
2k views

Where are pages and blocks created in the admin section stored?

I have created blocks in the Magento Admin GUI as well as in the frontend/.../templates directory. Both have been tested and they work fine. My question are: Where do the blocks and pages that ...
3
votes
2answers
902 views

Base url in cms page layout update xml

Right Now I'm facing issue to set base url in magento CMS page layout. Right now I'm doing like this,but I am not getting base url : <action method="addCrumb"> <crumbName>Home</...
3
votes
1answer
336 views

magento 1.9.3.2 Custom Image attribute not working on CMS Page

Error: Fatal error: Call to a member function setData() on boolean in C:\xampp\htdocs\magento-1-testing\app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php on line 141 I have create a ...
3
votes
1answer
1k views

How to create a page that show all brands magento 2

I download module Ves_Brand ; i want to create a page that show all brands some ideas please! i know that i have to create a module and controller to show page but what i have to do inside that. ...
3
votes
1answer
2k views

Magento 2 get CMS page url and output it to a html file

I have the following code in a html file. <div><span data-bind="i18n: 'insurance condition'"></span> <a href="https://example.com/index.php/sales-and-delivery-terms" target="...
3
votes
2answers
1k views

CMS tree structure in Magento 2

We are looking for a method to build up the cms pages in Magento 2 with a tree structure so that you can set hierarchy. For Magento 1 you have several modules, but we didn't find anything for Magento ...
3
votes
0answers
45 views

Display message from message manager above specific block Magento 2

I have redirection from controller to CMS page with custom message defined using messageManager. It show up the message before my CMS page content begins (below header part). but i want to display ...
3
votes
0answers
250 views

Custom Model Relationship (CMS Page + Product)

I am trying to assign a Product Object to a CMS Page Object, so when you have the CMS Page Object, you can do something like this: $product = $page->getProduct(); I have modified the CMS Page ...
3
votes
4answers
296 views

Magento 2.2.5 page and block module not displaying grid and button

I just installed Magento 2.2.5 but in admin > content > page the page grid and the button are not displaying. Even in the block the same issue happens, records grid and button is not displaying. ...
3
votes
0answers
29 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.
2
votes
3answers
4k views

Magento 2.2.2 how to check if current page is a CMS page in .phtml file?

I am using the following code to check if the current page is Product detail page: $objectManagerCms = \Magento\Framework\App\ObjectManager::getInstance(); $registry = $objectManagerCms->get('...
2
votes
3answers
576 views

Load my regsitartion page in CMS page - Magento 2

My registration page is coming from path: /app/design/frontend/Mgs/claue/Magento_Customer/templates/form/register.phtml I am trying to load that in a CMS page. Not sure how to do that. Tried many ...
2
votes
3answers
639 views

what is the difference between cms page link and cms static block. Catalog product link and catalog category link

I know about catalog new product list, and how to make them show on the home page using the widget. But am having a hard time understanding the difference between cms page link and cms static block. ...
2
votes
2answers
2k views

Magento 2: How to Redirect from Observer to CMS Page

I want to restrict some products from add to cart and redirect to a cms page on Add to Cart action. I have used 'controller_action_predispatch_checkout_cart_add' event. The code restrict the add to ...
2
votes
3answers
3k views

Magento 2 CMS page add custom breadcrumbs

I have tried the below code for Magento 2 cms page custom breadcrumbs, but I got this error : Please correct the XML data and try again. Element 'action': This element is not expected. Line: 3 ...
2
votes
2answers
677 views

How can I get products details on CMS Page - Magento 1.9 [closed]

I need to get products name and thumbnail images on cms page if customer enters sku, they get name, price, and thumbnail images. Customer get short details using sku, if customer enter sku for given ...
2
votes
1answer
85 views

Pages that Magento 2 frontend comprises of

I am trying to understand Magento frontend. I stuck at a question that the types of pages are available for frontend. I mean to say like pages -product grid page, checkout page. I want to know all the ...
2
votes
1answer
2k views

How to add PHP to a CMS page in Magento 2?

Via Admin > Content > Pages I made a page that I will be using as the homepage. I want to add some PHP to this page, however this does not work (directly). How can I do this? I remember using a ....
2
votes
2answers
426 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 ...
2
votes
1answer
44 views

How to include CMS page in the phtml page in magento 2.2

I want to include the CMS Page in a phtml template. How can I achieve this? Can anyone help me over here?