Add a new banner group in Indies Banner module

Hello Friends.

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.

Magento\app\code\community\Indies\Banner\Model\status.php

Now add the new entry for our style in static public function getPreAnimationArray() function at the end.

For example:

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

1

and value”vdslider” display in the Banner Group Grid as follows.

2

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:

Magento\app\design\frontend\[your theme]\template\indiesbanner\Banner.phtml.

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.

Magento\app\design\frontend\[your theme]\template\indiesbanner\effects\bannerslider.phtml.

In this file we can put logic for new effect.

I Hope this will help you.

Thank You

Speak Your Mind

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: