Formatting database-driven content

You can format output elementsIn a database-driven content block, an element that displays the contents of a single database field or, alternatively, the value of a parameter. in database-driven content blocks as you can ordinary, static text. Any formatting you apply to an output element is applied to all of the generated content that results from it when the document is viewed in a browser. As with static text, you can either use single-instance formatting with an output element or apply a style to it.

To apply character-level formatting to an output element, such as font family or font size, select the element placeholder (the highlighted word “[val]“) and then apply the formatting.

To apply paragraph-level formatting, such as alignment or line spacing, place the insertion point on either side of the element placeholder and then apply the formatting.

Note that since an output element is an indivisible unit, any formatting you apply to it applies to all of the generated content that replaces the placeholder; you cannot format parts of the generated content individually.

Each output element in a block occupies one cell of an HTML table that the Database Wizard creates to arrange the elements neatly on the page. Therefore, in addition to applying character- and paragraph-level formatting to an output element, you can modify the properties of the table cell that contains it, as well as the properties of the table that contains the entire block. For example, you can adjust the widths and heights of the cells, change the horizontal or vertical alignment of the cell contents, or change the border settings of the table.

Namo Web Editor icon note Formatting database driven contentWhen applying a style to an output element, note that the results may differ depending on whether you select the element before applying the style. If you select the element first, Namo WebEditor will create a <span> tag around the output element and apply the style to the <span> tag. But if you just place the insertion point next to the output element and then apply a style, Namo WebEditor will create a <p> tag around the element and apply the style to the <p> tag. In most cases, the results will look the same, but certain formatting properties, such as background color, look differently depending on whether they are applied to a <span> or a <p>.

Namo Web Editor icon note Formatting database driven contentIf the contents of a database field displayed by an output element include HTML tags, the markup will affect the appearance of the contents, when viewed in a browser, in the same way that they would with static content.

Related topics

Adding static content to a database-driven document

Formatting database-driven content