We use Indies Banner module in our magento application. But up to this time we could only use the default banner styles that were provided by module itself. Today I will describe the way to add new style in the banner module and use that style as per our requirement. For that you have to follow these steps:
STEP: 1: NAME GIVEN TO STYLE FOR ADMIN INTERFACE
For Giving the name to new style, open the status.php that is stored at following location.
Now add the new entry for our style in static public function getPreAnimationArray() function at the end.
array( 'value' => 'vdslider', 'label' => Mage::helper('banner')->__('Image Banner Slider'), ),
The above entry “’Image Banner Slider” considers as the label and “vdslider” consider as a value that pass in the array. The label display as option in the Banner Group as
and value”vdslider” display in the Banner Group Grid as follows.
STEP: 2 NOW REGISTER STYLE FOR EFFECT
In step-1 we just declared the new style. Now in this step we can provide the effect to that style. For giving the effect first we will make entry of that style into banner.phtml located at:
Entry made using adding new case for our style. For Example
case 'vdslider': $template = $this->getLayout()->createBlock('banner/banner', 'bannerslider.banner')->setBannerGroupCode($bannerGroupCode)->setTemplate('unibanner/effects/bannerslider.phtml')->toHtml();<br /> break;
In the following two things are more important.
First the case title (vdslider). The title is the value of style that is given in the step-1.
Second thing is the name of file that is created for this style. Here we create ‘bannerslider.phtml’ and set this file as template as follows. “setTemplate (‘unibanner/effects/bannerslider.phtml’)”.
STEP: 3 CREATE STYLE FILE FOR FRONTEND OUTPUT
The file that is set as template (setTemplate (‘unibanner/effects/bannerslider.phtml’)) in step-2 needs to be created at the following location.
In this file we can put logic for new effect.
I Hope this will help you.