Skip to content

Kitto.Html.TemplateDataPanel

KittoX TemplateDataPanel controller è renders database records using a custom HTML template file. The template file defines the HTML for a single card/row; it is repeated for each record with {FieldName} placeholders substituted with record values. Special placeholders: {_KEY} = URL-encoded record key string, {_VIEW} = view name. These allow HTMX attributes inside templates. Legacy <tpl for=".">...</tpl> markers are still supported for backward compatibility (prefix/suffix around the repeating section). Inherits toolbar and filter support from TKXListPanelController. No paging (all records loaded at once). Replaces TKExtTemplateDataPanel from Kitto.Ext.TemplateDataPanel.

TKXTemplateDataPanelController class

pascal
class function BuildTemplateContent(AStore: TKViewTableStore;

Loads the HTML template, expands macros, loads all records from the store, and renders the template with field substitution. Class function so it can be called from HandleKXDataRequest.

pascal
class function BuildSelectableCards(AStore: TKViewTableStore;

Like BuildTemplateContent but wraps each record in a selectable card div with data-key, onclick/ondblclick handlers (for use as CenterController inside a List controller).

Released under Apache License, Version 2.0.