close

Filter

loading table of contents...

Content Application Developer Manual / Version 2404

Table Of Contents

4.3.5.3 Advanced Metadata Usage

For Studio preview integration, you usually use content and property paths as metadata to specify the source of generated HTML output. As convenience, the metadata macro / tag automatically converts object and string parameters to metadata nodes with a single "default" property named "_" (underscore), containing the given data. You only need to specify this default property explicitly if you want to add custom metadata to the same metadata node.

The Studio preview integration only evaluates content objects and properties in the _ property, the properties cm_preferredWidth and cm_responsiveDevices which are used for the device slider, and additionally the property cm_highlightStrategy to control the highlight border rendering strategy.

All metadata using other property names will be handed through to Studio, but is not interpreted by the built-in preview integration. To take advantage of such custom metadata, you have to implement a Studio plugin that accesses and interprets this metadata. For details, see Chapter 1, Introduction in Studio Developer Manual.

Here is an example of the same combination of preview metadata and custom metadata in FreeMarker.

<@preview.metadata [self.content, {"_": "properties.title",
    "custom-key": "custom-value"}]/>

Example 4.13. Mixed preview and custom metadata in FreeMarker


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.