Introduction
This article demonstrates how to utilize the Web Templates and Content Snippet features effectively in Dynamics 365 portal. Microsoft has used the DotLiquid as Liquid Template Engine for their Dynamics 365 Portal. This liquid template helps to render the contents dynamically in the Portal. Content Snippet can be used as a collection of Key value pair storage.
Content Snippets
From the top ribbon in Dynamics 365, you can find the icon for Portals (if portal feature is enabled from Office 365 Admin -> Dynamics 365). If portal is not enabled in your Dynamics 365 instance, please follow the below steps.
Figure: 1
To configure the portal, follow the below steps.
Figure: 2
Before enabling the Portal, we need to select the type of portal. In this example, I have used Customer Self-Service portal.
Once the Portal is enabled from Office 365 Admin, the "Portals" block will be available in the top ribbon in Dynamics 365.
Figure: 3
From the Portals, you will see various features grouped under categories like Website, Content, and Security.
Figure: 4
Select Content Snippets from the ribbon, to view the contents list. A few links highlighted in the below screenshot are related to home page.
Figure: 5
To add new Content in Snippet, click “+ New” icon at the top action bar.
Figure: 6
We can make use of these contents in Web Templates.
Web Templates
These web templates are used to render the web pages. It has few codes in DotLiquid format. We can make use of CSS styles, Content Snippet, and HTML codes in Liquid format.
If you go to “Web Templates” (Portals-> Content-> Web Templates) as shown in figure 4, you will see the list of templates.
Figure: 7
Sample Web Template
The below image shows the sample liquid template for Home web template. That also contains references from other entities like Site Markers, Web Files, and Content Snippets.
Figure: 8
Here is the place where the result will be displayed in the Portal (Output)
In the below image, you can see how each part of Homepage is rendered from the web template.
Summary
In this article, we have seen how these Content Snippets and Web Templates play a vital role in the portal. Without writing any code, you can tweak the web templates to bring out the changes in the web page of Portal. Also, you can change the headers and contents within the portal pages by making use of Content Snippets.