Using the format arg in widgets

How to use the format arg in widgets.

All widgets have a default output format that dictates the structure and styling of each listed result. In special cases, you may wish to change the format on a case-by-case basis. For example: a news widget which displays headlines only, or a blog style news widget which shows the full body text of a story. This functionality will be difficult for basic users to grasp, but savvy users or admins may help provide assistance where needed using this feature.

From the LiveWhale interface, click the "Widgets" link.

Click the widget you wish to edit, or click "Add a New Widget" and then select the type of widget you wish to create.

Find the arg named "format" (or format_starred, if you wish to use a special format for starred items in your widget's results). By default, the format field will be empty, in which case the default format is used. To create a custom format, click on the available format variables beneath the text field and they will be added to your format field one at a time.

If you wish to customize the format further, you may edit the text field directly to fine tune the structure or to add any CSS classes you want.

Use the widget preview box to preview your changes, before saving your widget with the custom format.

 Note: In some circumstances, a {title} or {headline} var will come pre-wrapped with an <a> tag, linking to the item. If you wish to use a title or headline inside an HTML attribute, and therefore do not want the <a> tag, you can use {title_text} or {headline_text} instead. All other variables can have "_clean" appended to the variable name for use in HTML attributes. i.e. {summary_clean}.