How to get current CMS page id in Magento2

To get the id of current CMS page in Magento 2, use the following code snippet.

There are so many other methods to get CMS page details like title, identifier, content, and content heading. Lets check one by one.

To get the identifier of the current CMS page you can use

To get the Page Title :

To get the Page Content :

To get the Page Content Heading:

Thats it.

1 Comment

  1. Great article. I learn new information from your article, you are doing a great job. Keep it up!

Leave a Reply

Your email address will not be published. Required fields are marked *