Advanced widget creation guide


Portaneo is using the Google widget standard.

Table of Contents

Your widget is an XML file :



The document has 3 parts, each will be fully explained below :

widget's properties

The ModulePrefs tag is used to define the properties of the widget :

Require features widget

Some tags can inform API that a widget contains some required features.

With POSH, you can add a require which inform API the l10n files of your widget are relative to your portal. So your url might be relative.

If you download a Portaneo widget, this widget contains the following require feature.

Some Portaneo widgets can be integrated to your portal by your administrator. In this case, the urls will be relative to your portal. These widgets contain the following require feature.

widget's options

The UserPref tags are used to define the widget's options, that will give personalization to users. These are the options that show up when you click on "configure" button in the widget's header.


widget's content

The Content tag regroups the widget's HTML and javaScript code.
With new version (Posh 2.1), you may define several content for each view of your widget, home view for original widget, canvas view for full screen state.

view attribute, several options :


default view: home


Two views and same content


Two views and two contents


Templates



Examples

For the example overviews, copy / paste the codes in the widget tester

Hello World !


Colored box


Read an HTML file


Read and treat an XML file


Test your widget

After each widget modification, test it with the tester before asking for publication (tool available on the Advanced widget page). Ready? GO!