Application Content

Content sections allow developers to define the content to be loaded for the different views of a gadget. As described in Chapter 1, most containers include different views, such as a small or large view, and Content sections are where those views are defined.

Content sections have several attributes available to them, all of which are optional (Table 3-8).

Table 3-8. Content attributes

Attribute

Description

href

A destination URL for the content to be loaded. This is a proxied content-loading approach to defining your gadget sections.

preferred_height

The initial height of the gadget in pixels.

preferred_width

The initial width of the gadget in pixels.

type

The type of content to be loaded. The values can be either html (default) for content within the gadget, or url for an external content URL specified with the href attribute.

view

The view for which the content is to be loaded. Containers may offer multiple views, which can be defined through these Content sections. Multiple view names are specified as comma-delimited values (e.g., home, profile).

Get Programming Social Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.