0

I have created admin grid and form using ui-component for adding banners.

In frontend I have displayed the banners collection by hitting the controller path. Without controller path, how do I show my template(phtml) which contains collection of banners in home page?

How do I create static block in admin to display my collection(phtml) in homepage.Please provide me a solution.

1

You can use below code in CMS homepage content.

{{block class="Magento\Bannerslider\Block\Slideshow" template="Magento_Bannerslider::bannerslider.phtml"}} 

Replace class and template as per your module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.