A placeholder is a marker that represents the content of a metadata property from your document or publication. When mapped to a property, it displays that property’s value wherever the placeholder appears.
Placeholders act as dynamic fields that automatically display metadata values throughout your document. They’re especially useful for content that appears multiple times, such as:
When you update a placeholder’s source value once, all instances update automatically, saving time and ensuring consistency across your entire publication.
Unlike search and replace, placeholders maintain a permanent connection to their source values, making ongoing content maintenance straightforward and reliable.
For longer or more complex content reuse needs, consider using transclusion instead.
Placeholders are useful in the following circumstances:
Creating and updating data in one location, but displaying it in many, has the following advantages:
In the user interface, the
Consider a typical software license, where the copyright holder’s name appears multiple times throughout the document:
Using placeholders lets you define the copyright holder’s name only once in the metadata, rather than updating every instance manually when changes are needed.
When you need to update the company name or the year across the entire document, you change the metadata property value only once, and all instances are automatically updated when the document is published or when placeholders are resolved.
A placeholder can be mapped or unmapped depending on whether a corresponding metadata property is defined.
You can also choose to resolve the placeholder to show the metadata value by clicking the
The following table summarizes what is displayed in the content:
When a placeholder is mapped, it means that a metadata property with the same name is defined, and it can display the actual value of that property when resolved.
The name of a placeholder is different to its placeholder text. Typically the placeholder text has mixed case and spaces where the name is all lowercase with underscores instead of spaces. It is the same with the metadata property name and its title (hold the pointer over a property title to see its name). For a successful mapping the placeholder and property name must match exactly, not the placeholder text or title.
If a placeholder that has a corresponding metadata property appears unmapped then use the right-click Placeholder option to select the property from the placeholder dialog. This ensures an exact match.
When a placeholder is unmapped, it exists in your content but doesn’t yet connect to any metadata property. PageSeeder
displays a
It’s okay for placeholders to be unmapped while you’re working on your document. PageSeeder supports unmapped placeholders so that you can focus on authoring and create the corresponding metadata property at another time.
A placeholder can be mapped to a corresponding metadata property.
Without a mapped property at the publication (or document) level, PageSeeder considers the placeholder to be “unmapped” and cannot resolve it to a value.
There are no order dependencies on the creation of placeholders. It doesn’t matter if the placeholder creation is before, or after, the property.
Metadata properties of a document are edited in the Metadata tab, in the document info and metadata panel. When a document is also a component in a publication, the metadata of the publication root document is available in the document’s publication tab.
Where a placeholder is part of multiple publications, the metadata property can have different values in each publication root.
For more information, see how to create metadata properties for placeholders.
Metadata properties for placeholders can also be created upon document upload.
In review mode, click the
What displays in the document depends on the placeholder state, and to which publication it is resolving. See the table summarizing what displays, in the preceding states section.
When placeholders are resolved, and the publication root document is published, the published content contains the following:
Use this when adding a placeholder to content, before a corresponding metadata property has been created.
To insert a new placeholder in your content using the placeholder dialog:
To insert a new placeholder in your content using a shortcut – inline text pattern:
Space. In this case the placeholder name is generated from the placeholder text by converting it to lowercase and replacing space with underscore.In both cases, the PSML content has a <placeholder> element in the PSML, for example,
<placeholder name="country_of_origin">Country of origin</placeholder>.
Where a corresponding metadata property doesn’t exist yet, the placeholder state is
unmapped. When the document is saved, in review mode, you see a
Use this when a corresponding metadata property has already been created and can be used as a placeholder.
To insert a placeholder and map it to an existing metadata property from the auto-suggested metadata properties available in the group, use a shortcut – an inline text pattern:
"[" (left square bracket), followed by the first letter of the metadata property name. Press Enter when your name displays, or click another option if more than one is auto-suggested.The auto-suggest lists all the available metadata properties, that can be used for placeholders, in the current group. Where a property name has an * asterisk at the end, that property is not currently available to use in your current document, but it can be added to your current publication or document.
Metadata properties for placeholders don’t require any specific configuration, but
they can only be mapped to single value properties with a type of: text, date, or datetime.
<placeholder> element, see the PSML documentation on the PageSeeder developer’s website.
The PageSeeder user manual
© Allette Systems (Australia)