SproutCMS

This is the code documentation for the SproutCMS project

function render()

This function should return the content of the widget that is used on the front-end of the website.
The content should be returned as well-formed HTML.
The content will be contained within a DIV element,
which has the class 'widget', and the class 'widget-[WIDGETNAME]' applied to it.

Styles and Javascript can be loaded with the needs helper, usually the Needs::fileGroup function is most useful.

Usage

string $Widget->render ( int $orientation );

Arguments

  1. int $orientation
    The orientation of the widget.
        Will be one of the constants defined in the WidgetArea class.
        ORIENTATION_TALL - used for sidebars, and other mainly tall areas
        ORIENTATION_WIDE - used for wide areas, like the main content area

Return value

  • string
    The output HTML.

Tags:   widget-api   api