On this page
dbxTPL is the template layer of dbxapp. It separates output from technical logic. PHP prepares data, templates determine structure, positioning and integration.
Classification in the Golden Path
The continuous module example is under Mandatory module manual. This chapter only deepens the template abilities.
dbxTPL does not load any technical data and does not mutate any records. Values from the dbx pipelines are used without local escape help functions. Additional escaping is only necessary if an actual raw external input outside the existing field, report or component pipeline is to be output as literal HTML text.
Storage locations
Module templates are here:
Templates can be language-dependent. If the active language e.g. De dbxTPL first attempts the language file and then falls back to the neutral file:
Labels, fixed headings and small help texts in the template can thus be maintained language-specifically without branching out the module code.
System templates are usually in the module dbx:
Loading templates
dbxContact|ticket-row means:
Replacing markers
Template:
PHP:
Result:
Using objects
dbxForm and dbxReport can use objects in templates:
PHP:
Template distribution with dbx split
Some dbxapp components not only read a template as a whole, but divide it into areas. dbxReport For this purpose, use the marker:
A typical report template dbxAdmin|report-sysmsg:
The ranges are:
- Before the first dbx split: headers, e.g. Table headers.
- Between the first and second dbx split: Body/Row-Template, is repeated per record.
- After the second dbx split: Footer or downstream report structure.
For templates with more split markers, dbxReport can also distinguish header/Footer for subsequent pages. Importantly, The division belongs in the template. The report evaluates them.
Module inclusion
Templates can integrate modules:
The dbxInterpreter executes this module call at the page output.
DesignPage, Page and Content Templates
A typical structure:
DesignPage defines the external frame: Navigation, Main Area, Footer, CSS/JS-Positionen.
Page templates define page types: Standard page, landing page, admin page, dashboard.
Content templates define specific content blocks: Hero, Body, Gallery, Footer.
Module templates define subject areas: Report, Form, Toolbar, Panel.
CMS templates can divide content into areas and columns via simple markers:
The CMS renderer distributes the editorial content on these slots. As a result, a CMS page without its own PHP code can be output in one column, two column, three column, with header, hero, gallery and footer.
Position
Positioning belongs in templates and CSS, not in controller logic.
Good:
Not good:
dbx edit=1 and dbx edit=2
dbx edit=1 and dbx edit=2 Mark editable areas in the rendered page. The website is still normally displayed. The interpreter remains active.
Important:
- The page template must contain: [modulus=... executed.
- In the template editor itself, raw text is displayed.
- Markers such as {Title: remain visible in the template editor.
- The editor may not store the rendered output.
Rules
- No long HTML strings in PHP.
- Templates describe structure.
- PHP provides data, status and actions.
- No blanket escape wrappers around normal DD, form or report values.
- Everything that is reusable gets its own template.
- Dashboard templates should only contain division and domain areas per [modulus=... incorporate.