Dynamic Calendars

Top  Previous  Next

As of version 3.9, the Publisher supports creation of dynamic calendar templates, meaning that the template will fit all years and different national preferences. This is achieved by placing special placeholders into the text shape, which will be later replaced with appropriate day, week and year numbers.

Font and color settings can be applied to the placeholders just as to the any text, and will be preserved during replacement.

When the user chooses a product with these placeholders, he will get the following dialog:


First, you need to add a TextSubstitutions parameter to each calender product inside the products.xml. Example:

  <PRODUCT id="dm050001" active="1" selected="0" groupid="dm050">

    <LongName>Calendar A5 14,8 cm x 21,0 cm</LongName>

    <ShortName>14,8 cm x 21,0 cm (A5 portrait)</ShortName>

   <FormatWidth>14,8 cm</FormatWidth>

   <FormatHeight>21,0 cm</FormatHeight>


    <Description format="text/html">...</Description>



    <StatusMsg>Calendar A5 14,8 cm x 21,0 cm</StatusMsg>

    <EasyMode />







      <CHUNK title="content">









To enable calendar rendering for a product layout in the design mode, you need to define it for each text shape separately. This can be achieved by toggling the calendar button in the text edit dialog:


Available placeholders


Will be replaced by the year which the user enters in the dialog after selecting the product, e.g 2016.


Indicates the month, to which the day cells {cXrY} are related. This placeholder is mandatory.

This placeholder can be placed anywhere in the text shape and will be removed in the final product.


Indicates the first day of the week. Can be {weekstart:1} for European-style calendars (Monday is considered the first day of the week), or {weekstart:7} (Sunday) for North American calendars. If you omit this placeholder, the default week start will be 1.

This placeholder can be placed anywhere in the text shape and will be removed in the final product.


Week number, where X is a week of the month from 1 to 6. This placeholder will be later replaced by appropriate number of the week of the year, for example {w1} in December of 2016 will be replaced by 48, the 48th week of the year.

If you don't want to display week numbers, then don't insert the week placeholders.


Cell (day) of the month, where X (column) is the day of the week from 1 to 7 and Y (row) is the week of the month from 1 to 6.


Below is an example of the calendar-enabled text shape for the month of December:

























































In the year 2016 calendar, this will be rendered as:


You can use the dynamic calendar feature to create static calendar layouts, if you want to add holidays and special events like birthdays. For this you need to:

Start the Publisher as a user (no design mode) and create a custom calendar from your dynamic calendar layout.
Add custom dates to this calendar, and store this project as a replacement for the dynamic layout file, which is included in the next setup creation.

2019 © 3P Photobook Publisher