Customizing Using Liquid Code
Dynamics 365 Portals is a powerful tool that allows external users to access Dynamics 365 content, such as their data, through a contact record with varying degrees of accessibility based on their web roles. These web roles are managed by the CRM Administrator. As the Administrator, there are plenty of changes you can make, so let’s start exploring those capabilities with something simple.
The first thing you can do is modify some of the out-of-the-box portal behaviour by changing the portal username on the navigation bar to “Admin”. This customization is possible by modifying the liquid code for the header. Here’s how it’s done.
Creating a Content Snippet
Create a content snippet to hold the label text. Content snippets are small chunks of editable content. Developers can place content snippets on a page template to customize content to populate any portion of a page’s layout. Snippet controls, which are responsible for rendering the content of snippets on the web-facing portal, are placed on .aspx pages by developers.
Start by going to Portals > Content Snippets and click New to create a new content snippet.
Fill out the information with the Value field including the text change. In our case, Admin.
Inserting Into Header Template
With the content snippet created, now you simply have to insert it into the header template for the navigation bar. Go to Portals > Web Templates and click on the Header item under Active Web Templates.
In there you will find the liquid code for the header. Liquid code is an open-source template language integrated into portals. It can be used to add dynamics content to pages and to create a wide variety of custom templates. Modify the liquid code as shown below in the before and after screenshots.
Before:
After:
And you’re all finished! Doing something like changing a website header in the primary navigation bar uses portal settings, snippets, web links, and site markers, which is a great introduction to Dynamics 365 Portals.