Modifying widgets

If you want to just give a simple widget to the existing ones, check out this documentation, but if you have some html, css and php coding knowledge, you could modify their more complex codes to your needs.

Our widgets are having three important files. The first one is this:

Joomla

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype]\config.xml

WordPress

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype]\config.xml

This is where the backend options are. If you want to, you can add extra options to it, or modify the current ones. The important thing is, if you want to add a new <param>, put it inside the <root> and <params> tags, give it a name, which should be unique (from other widgets too). It will be, what makes the backend to save down this option, also you will use that name in the php code to get the value. After that give it a type, which should be one of what we made, so just look around in our xml files to find one, that you think would be okey, like the text type might be good for you. Give a label what will be written into the backend to this option, and you could give a default value too, so it should be something like this code:

<param name="uniquename" type="text" label="My new option" default="xyz" />

Then use the value you will get here in the php file:

Joomla

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype].php

WordPress

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype].php

You can get to the parameter like this (the second parameter is a default value, if the name can't be found, or it doesn't have a value):

$params->get('uniquename', 'somevalue');

And usually a $html variable is containing the html code of that widget, so change it as you would like to have it. There are two variables coming to here, which can come handy. One is the $slider, which contains the datas of the slider, and the other one is $id, the id of the slider, what you can use to make actions for only this slider, for example you need that for our javascript api, to make the slider slide somewhere.

You can also either modify the style in here, or in the style.css file:

Joomla

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype]\style.css

WordPress

plugins\nextendsliderwidget[widgetname]\[widgettype]\[widgettype]\style.css

It might will be a style.less file, which is the same as a css file, just you can use variables in them, what you won't need in this case.