magento-2-banner-slider icon indicating copy to clipboard operation
magento-2-banner-slider copied to clipboard

How to insert Banner?

Open scheung38 opened this issue 8 years ago • 5 comments

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? screen shot 2017-05-14 at 02 17 25

scheung38 avatar May 14 '17 01:05 scheung38

Here same error

vijaychauhanssn avatar Jun 03 '17 13:06 vijaychauhanssn

You can follow the user guide: https://docs.mageplaza.com/banner-slider-m2/index.html

imsamthomas avatar Jun 30 '17 10:06 imsamthomas

@vijaychauhanssn if you still get the issue. You can get technical support from Mageplaza at https://mageplaza.freshdesk.com

imsamthomas avatar Jun 30 '17 10:06 imsamthomas

<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?

j-mccarthy avatar Nov 28 '18 21:11 j-mccarthy

i followed the steps as per the doc but still do not see any slider or banner on my phtml file. Anyone any help?

VishalParkash avatar Dec 29 '20 08:12 VishalParkash