Variable Text Fields in Publish Pro

Add variables to your publication that will be replaced at build time. This information can include page numbers, the current date, the author name, and so on, and can be added either to a particular page or, if you want it to appear on every page, to the master. This functionality allows you to provide context about the publication for your reader, such as who created the publication, when, how many pages it has, which page you are on, and so on.

When you add a variable text field to your publication, it is added to your working file as a variable tag (for example, #Today). You can format this text field exactly as you would any text, by dragging and resizing the text box on the canvas or by selecting the text box and changing the formatting for the text from the Component ribbon.

Note: This is the simplest type of dynamic text available in Publish Pro. Other dynamic text options allow you to replace placeholders with slicer data or pull data from matrix grids into text fields, among other dynamic functionalities.

  • Click here for other Dynamic asset features

Available Text Field Variables

Basic variables

You can add the following basic text field variables:

  • Current Date: Today's date.
  • Create Date: The date the publication was created.
  • Modified Date: The date the publication was last modified.
  • Created By: The name of the user who created the publication.
  • Modified By: The name of the user who last modified the publication.
  • Publication Title: The title that the publication was saved with.
  • Description: The description that was added to the publication when it was saved. Note: This description is captured in the Save dialog.
  • Page Number: The page number for this page. For example, "1" if this is page 1 of 3.
  • Total Pages: The total number of pages in the publication.

Advanced variables

You can also add the following advanced text field types:

  • Page Insights: Uses AI to dynamically generate a paragraph or more of "insights" text, based on the visuals and selections included on the page.
  • Table of Contents: Adds a table of contents to the page.
  • Model Processed Date: Adds a variable that is replaced with the date when the selected data model was last processed at build time.

Tip: When you add Page Insights or Tables of Contents, you should be aware that they may require more space on the page than the default text box allows. You should re-size the text box accordingly.

Adding variable text fields

Step 1: Select a location for your variable

You can decide where to add your variable in the Pages panel:

  • To add your variable to a single page, open the page on the canvas by selecting it in the Pages panel.
  • To add your variable to all pages or just to the cover page of the publication, select the relevant master option above the Pages panel.

Step 2: Add your variable text field

Variable text fields include variable values that are dynamically replaced with information from your publication when it is built.

From the Toolbox:

  1. Right-click Add Text Field (green arrow) and select the required text field from the menu options.
  2. The Text Field options are described above.

  3. Click the canvas at the point where you would like to add your variable.

The #Variable is added to the canvas in a text field. This value will be replaced with the current value when the publication is built. For example, the Current Date variable (#Today) is replaced with today's date as shown below:

Tip: You can build your publication at any time by clicking the Run button at the top-left of the workspace or pressing F2 on your keyboard.

Adding Page Insights using Chatbot

If you use the Chatbot to create your publication, you can include a request to "add page insights" as part of your prompt. When the publication is rendered, the Page Insight panel is replaced with some dynamically generated output that is returned in natural language.

For more information, see the step-by-step exercise at Exercise: Building a Publication using the Chatbot.

Formatting your variable text (optional)

Apart from Tables of Contents, you can format the variable text as you would any other text; resizing the text box, moving it to a more appropriate location on the canvas, changing the font formatting for its content, and so on. As with any other content item, you can use the standard editing options on the right-click menu, the component ribbon, and the canvas to manage your text formatting.

  • Click here for more about canvas options (resize, move, and so on)
  • Click here for more about formatting from the Component ribbon