How to insert placeholders
Skills required | XML |
---|---|
Time required (minutes) | 15 |
Intended audience | Author |
Difficulty | Easy |
Category | Document |
Objective
A placeholder is a marker for some simple text content that is repeated throughout the publication, for example [company name]. These placeholders will be replaced by their corresponding actual value in the publication metadata properties.
This tutorial demonstrates how to insert them, set the actual value and export to Word DOCX.
Prerequisites
To complete this tutorial requires:
- PageSeeder contributor access to a group on a server with PageSeeder version 6 or later installed.
Tutorial
Creating a publication
Create a publication root document and content as follows:
- In PageSeeder go to a group.
- In this group create or open an existing document of the publication root type (e.g.
references
). - If it’s not already a publication click the Document information icon on the right, click Make this document a publication, ensure there is a Publication ID and for this example, select Publication type "
default
". Click Submit then Save. - If there is no existing content, double-click in the root document, click Browse and create a document (for example
default
type), select it and save. On the root document press Ctrl-S to save everything. - Click a content document, add some headings and paragraphs if required.
Insert placeholders
A placeholder is a marker for some simple text content that is repeated throughout the publication, for example [company name]. These placeholders will be replaced by their corresponding actual value in the publication metadata properties.
- In a content document, enter edit mode by double clicking on a paragraph.
- Place the cursor in the text and type [[company name]] and press space.
- Press Ctrl-S then click on another location in a paragraph.
- Type [c and click on the [company name] that appears. This will automatically add an existing placeholdler.
- Press Ctrl-S then click the edit icon
(top right) to turn edit mode off. - A warning should appear next to the placeholders to indicate they have not been defined.
- Click the (i) Document information icon in the right margin.
- Click on the Publication tab and then on Add property.
- For Title enter Company name and for Value enter ACME Pty Ltd
- Click Submit then click Save.
- Click the [iii] Resolve placeholders icon at the top and ACME Pty Ltd should appear in multiple places.
Export as a Word document
- Go to any document in your publication.
- Click the Document export (rocket) icon in the left margin.
- Under the Choose an export action drop down, select Export publication as DOCX and click Run.
- Open the document in Microsoft Word and see how the company name has been inserted.