Document! X 2022
Design the Content / Metadata Elements
In This Topic
    Metadata Elements
    In This Topic

    Metadata Elements are placeholders for content that are generated by Document! X and are the key to understanding how to customize templates. Metadata Elements can be inserted into Page Types and Scraps. All content in a Page Type or Scrap that is not a Metadata Element is static and output exactly as defined to the generated output.

    A Metadata Element consists of a type name and a collection of parameters; where each parameter is represented by a name and value pair.

    In a Page Type, an example "TypeName" Metadata Element looks like this:

    <!--DXMETADATA type="TypeName" ParameterName1="ParameterValue1" ParameterName2="ParameterValue2"--><!--DXMETADATA end-->

    In a Scrap value, exactly the same Metadata Element is expressed like this:

    %%TypeName:ParameterName1="ParameterValue1",ParameterName2="ParameterValue2"%%

    Common Parameters

    In addition to any specific parameters supported by a particular Metadata Element type, every Metadata Element supports a 'format' parameter and a 'blankformat' parameter. These parameters allow conditional formatting i.e. the format parameter is used as a template to render the element only if actual content was found and blankformat is used as a template to render the element only if no content was found. (For more information, see).

    Nesting Metadata Elements

    The content of a Metadata Element (or the value of a parameter) can contain another Metadata Element. E.g.

    %%TypeName:ParameterName="%%AnotherTypeName:AnotherParameterName=AnotherParameterValue%%"%%

    .. or

    <!--DXMETADATA type="TypeName" ParameterName1="%%AnotherTypeName:AnotherParameterName=AnotherParameterValue%%" ParameterName2="ParameterValue2"--><!--DXMETADATA end-->