magento-2-banner-slider
magento-2-banner-slider copied to clipboard
How to insert Banner?
User guide shows how to, with a Add Banner button, but after I loaded this repo into my Magento site as root/html/app/code/MageStore/BannerSlider
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
I don' t see how to add, so instead of expecting to menu option, I see 3 messages:
Add code below to a template file.
$this->getLayout()->createBlock("Magestore\Bannerslider\Block\SliderItem")- >setSliderId(your_slider_id)->toHtml();
You can put a slider on a cms page. Below is an example which we put a slider with slider_id is your_slider_id on a cms page.
{{block class="Magestore\Bannerslider\Block\SliderItem" name="bannerslider.slidercustom" slider_id="your_slider_id"}}
Please copy and paste the code below on one of xml layout files where you want to show the banner. Please replace the your_slider_id variable with your own slider Id.
<block class="Magestore\Bannerslider\Block\SliderItem"> <action method="setSliderId"> <argument name="sliderId" xsi:type="string">your_slider_id</argument> </action> </block>
Are these what I am expecting to see? and also where to place this codes?
Here same error
You can follow the user guide: https://docs.mageplaza.com/banner-slider-m2/index.html
@vijaychauhanssn if you still get the issue. You can get technical support from Mageplaza at https://mageplaza.freshdesk.com
<referenceContainer name="content"> <block class="Mageplaza\BetterSlider\Block\Slider" template="Mageplaza_BetterSlider::slider.phtml" name="bannerslider.homepage" before="-"> <action method="setBannerId"> <argument name="banner_id" xsi:type="string">1</argument> </action> </block> </referenceContainer>
I'm using the above to add a new slider with the id of 1.
The layout file the above is in, works. But the slider does not appear.
Cache has been cleared, this is not the problem.
The code for adding the slider via a block in layout file in your instructions here on github, does not reference an id, why is that?
Is there an error with my layout code above?
i followed the steps as per the doc but still do not see any slider or banner on my phtml file. Anyone any help?