corporate » labs » forge
E29 Incorporated

E29 Product Documentation


sGen: Adding widgets to a template

NOTE: At the time of this writing, the widget tutorials are still being finished.
This example uses the SSO login widget, which is complete and shipped as of
Serenity Platform version 2008.Summer.3 

Another strong point of sGen and the Serenity platform as a whole is the use of widgets. Serenity treats widgets like plugins that can be used across every application installed on Serenity. Take a look at the widget tutorials to find out how to write your own reusable widget.

For this example, we'll show how simple it is to include and use a widget in your template file using the Single Sign-On widget as an example.

Open your HTML wrapper or any other template bit you are using, and simply add the following widget tag on the page:

<sgen widget="sso_login" />

And that's it! Obviously the widget handles most of the heavy lifting, and the widget template files are editable. To change the HTML outputted by the widget, edit the files located here:

/cache/style/widgets/WIDGET_ID/

Where in this case, WIDGET_ID would be “sso”. Until the widget tutorials are finished, we encourage enterprising developers to open up the SSO widget code under /sources/widgets/swe_sso_login/ to learn how the widgets work.

Next up, the last tutorial for sGen, working with the sgen.parse plugins.

 
developers/tutorials/serenity/sgen-widgets.html.txt · Last modified: 2008/07/24 14:27 by akinder