WidgetBase (open)
Base class for widgets (former embedded objects) used for RTD documents which use the new 'rtd type' system
Syntax
LOADLIB "mod::publisher/lib/widgets.whlib";
OBJECTTYPE WidgetBase
Constructor
- MACRO NEW()
Initializes widget properties
Properties
- PROPERTY context
preview/webdesign context
- PROPERTY data
Data loaded into the object
- PROPERTY mergefields
Merge fields context (only available within mail RTD's for form handlers and form thank you page richtext RTD's)
- PROPERTY rtdtype
RTDType containing us
- PROPERTY whfsfileid
whfs id, if known
- PROPERTY whfssettingid
whfs setting id, if known
- PROPERTY widgettype
My type
Functions
- MACRO EmbedComponent(RECORD data, RECORD options)
Run this widget's wittycomponent (as specified in siteprofile) with this data
- MACRO PTR FUNCTION GetRTDBody(RECORD richdoc, RECORD options)
Return a renderer for a RTD from an instance record
- STRING FUNCTION GetWidgetType()
Get widget type as used in the preview
- OBJECT FUNCTION OpenRTD(RECORD richdoc, RECORD options)
Open RTD data using an rtdtype
- MACRO Render()
Function invoked when the widget should be rendered for a RTD preview
- MACRO RenderEmail(OBJECT mailcomposer)
Function invoked when the widget should be rendered inside an email
- MACRO RenderFieldSetPreview(RECORD ARRAY blocks, RECORD options)
Renders a preview with blocks of fieldssets, separated by a divider
- MACRO RenderImagesPreview(RECORD ARRAY images, STRING title, STRING description, RECORD options)
Renders a preview with images and a title/description box
- MACRO RenderInlinePreview(RECORD options)
Renders a preview of an inline widget
- MACRO RenderLive()
Function invoked when the widget should be rendered inside the webdesign
- MACRO RenderMultiColumnPreview(FUNCTION PTR ARRAY columns, RECORD options)
Renders a preview of a multi-column layout
- MACRO RenderSearchPreview()
Function invoked when the widget should be rendered for a RTD Search preview. By default the normal preview is used
- MACRO RenderSharedBlock(RECORD sharedblock)
Render a block from GetSharedBlocks/ResolveLocalSharedBlocks as a widget
- MACRO RenderTitleDescriptionPreview(STRING title, STRING description, RECORD options)
Renders a preview with a title and a description
- MACRO RenderWidgetInstance(RECORD widgetdata, RECORD options)
Render a widget directly