About this article
In this article, we will explain how to apply color themes to templates with the Dynamics Designer using the binding syntax. Applying a color theme can be done statically by referencing directly to a specific theme inside the ColorThemes data source, or dynamically by making the color theme dependent on a form field.
Prerequisites
|
How to apply a Dynamic color theme?
|
- Open Templafy task pane in your Office application
- Go to the ellipsis menu in the task pane and click on
Dynamics Designer
- Go to the
Document
tab - Select
Color Theme (Dynamics Templates)
- Click the
+
button - In the field
Color Theme
, write the desired binding - Click
Create
Examples
Example 1
Applying a color theme based on the user's choice.
Reference to a form filed (BrandedTheme) linked to the ColorThemes data source.
Binding |
{{Form.BrandedTheme.ColorTheme}} |
Input | Blue Theme |
Output | The blue theme will be applied to the template |
Example 2
Applying a color theme based on a user profile field.
Reference to a user profile form filed (Office) linked to the Office data source referencing the color theme with the column BrandedTheme.
Binding | {{UserProfile.Office.BrandedTheme.ColorTheme}} | |
Input | Berlin | Paris |
Output | The gray theme will be applied to the template | The blue theme will be applied to the template |
Example 3
Applying a color theme statically regardless of the user input or the user profile.
Reference to a specific color theme inside the ColorThemes data source.
Binding |
{{DataSources.ColorThemes["Blue"].ColorTheme}} |
Output | The blue theme will be applied to the template |
Comments
0 comments
Article is closed for comments.