cancel
Showing results for 
Search instead for 
Did you mean: 

installing BannerSlider

installing BannerSlider

hello,

 

i'm a magento novice and trying to install Banner Slider to 1.9.

i've tried several things but can't get the banner to show up above the content, below the menu om the home page (cms)

 

 

the manual says

  • Add code below to a template file

 

$this->getLayout()->createBlock(bannerslider/default)->setTemplate(bannerslider/bannerslider.phtml)->setBannersliderId(your_bannerslider_id)->toHtml();

so i added that to /app/design/frontend/default/theme569/template/page/3columns.phtml so that contains this code:

 

 

<body<?php 

echo $this->getLayout()->createBlock(bannerslider/default)->setTemplate(bannerslider/bannerslider.phtml)->setBannersliderId(your_bannerslider_id)->toHtml();

echo $this->getBodyClass()?' class="ps-static '.$this->getBodyClass().'"':'' ?>>



<?php echo $this->getChildHtml('after_body_start') ?>

<div class="wrapper ps-static <?php echo $this->getLang().'-lang-class';?>">

    <?php echo $this->getChildHtml('global_notices') ?>

 

then the manual continues with:

 

You can put a banner slider on a cms page. Below is an example which we put a banner slider with bannerslider_id is your_bannerslider_id on a cms page

 

{{block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml" bannerslider_id="1"}}

 

i'm confused with that one, it doesn't look like HTML or PHP, but I pasted it in the content and in the Layout update XML anyway but without any result

 

Please copy and paste the code below on one of xml layout files where you want to show the banner. Please replace the your_bannerslider_ids variable with your own bannerslider Id

<block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml">
<action method="setBannersliderId"><bannerslider_id>your_bannerslider_id</bannerslider_id></action>
</block>

 I'm not shure where to put that? I looked like some code in the Layout update XML but pasting in there didn't change the page.

 

thank you very much in advance.

 

 

3 REPLIES 3

Re: installing BannerSlider

Hi @bartaaldering,

 

The code you show at the first part seems to be wrong. You sample is something like:

 

echo $this->getLayout()->createBlock(bannerslider/default)->setTemplate(bannerslider/bannerslider.phtml)->setBannersliderId(your_bannerslider_id)->toHtml();

And maybe it should be:

 

echo $this->getLayout()->createBlock('bannerslider/default')->setTemplate('bannerslider/bannerslider.phtml')->setBannersliderId('ENTER_YOUR_BANNERSLIDER_ID')->toHtml();

Then, the example with double brackets is for being used into a static bloc or a cms page, as content. You can add that example into the editor.

 

The final example is to add the slider using layouts updates from your XML files (xml files you'll find inside your theme).

 

 

Re: installing BannerSlider

hi Daniel,

 

thanks for your help but unfortunately that didn't gave a banner om the homepage:

added this code 

 

echo $this->getLayout()->createBlock('bannerslider/default')->setTemplate('bannerslider/bannerslider.phtml')->setBannersliderId('1')->toHtml();

 

to /app/design/frontend/default/theme569/template/page/3columns.phtml 

 

 and

 

to 

 

/app/design/frontend/default/theme569/layout/page.xml

 

<block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml"> <action method="setBannersliderId"><bannerslider_id>1</bannerslider_id></action> </block>

 

and also 

 

{{block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml" bannerslider_id="1"}}

 

to the content of the home page

 

Re: installing BannerSlider

Hi @bartaaldering,

 

It will be (at least for me) to try to help without access to the code.

Maybe the best idea it will be to ask for support to the module vendor. I'm pretty sure will have a lot of experience about possible issues or situation with the module.