Magento2 How to add dynamic content on CMS pages 0 (0)

Magento2 How to add dynamic content on CMS pages 0 (0)

Sometimes we need to add a dynamic content to the CMS pages. We can use 2 possible ways to achieve that: Calling a custom phtml file directly from

Magento2 – Add a custom CSS class to the body element 0 (0)

Magento2 – Add a custom CSS class to the body element 0 (0)

Sometimes we need to customize the whole layout. We can do this by adding a custom class over the body element. For example, in order to specify the

Magento2 – How to get Current Url 0 (0)

Magento2 – How to get Current Url 0 (0)

To get url of the current page, the code below works everywhere: $objectManagerInstance = \Magento\Framework\App\ObjectManager::getInstance(); $url = objectManagerInstance -> get('Magento\Framework\UrlInterface'); echo $url -> getCurrentUrl(); From a .phtml template

Magento – How to display all products on the home page 0 (0)

Magento – How to display all products on the home page 0 (0)

To add all products at home page just go to your admin panel, navigate to CMS -> Manage Pages and then from pages click on your selected homepage