An alternative to an alternative to “search and replace”, a mapped placeholder is a marker that represents the content of a metadata property present in the root document of a publication. The content of the property is a short, simple text string: text,
a date, or time, that is often repeated throughout a publication, for example, [Company Pty Ltd]
. Displaying the value of a metadata property in place of the marker in the content, allows updates of the value throughout a publication,
with a single edit. Where a document belongs to more than one publication, different
metadata property values are possible depending on which publication is published.
Other use cases could be the name of a legal entity or significant date throughout a contract, or the product name in user documentation.
To reuse longer amounts of content, see transclusion.
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
There are two states mapped and unmapped. The following table shows what is displayed in the content when in either state.
User wants to display the value of the metadata property in one or more places in the content.
When user wants to leave placeholder text in the content as a prompt to create a corresponding metadata property later.
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 “unresolved”.
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 & 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 in States above.
When placeholders are resolved, and the publication root document is published, a mapped placeholder displays the value of the mapped property. If not mapped, the placeholder text will display.
Use 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 :
Enter
.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
unresolved. When the document is saved, in review mode you see a
Use 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)