...
Code Block | ||
---|---|---|
| ||
.override-classes.cp-dashboard-card{ // Override class cp-dashboard-card } .override-classes.cp-dashboard-card .link { // Override class link } .override-classes.cp-dashboard-card .image { // Override class image } .override-classes.cp-dashboard-card .title { // Override class title } |
Liquid syntax
The Dashboard page supports the Liquid template language.
You can access the following context from within your liquid template: { isAnonymousUser: bool, userRoleIds: string[], userRights: UserRight[], isDeveloper: bool, loginUrl: string, customer: { customerId: string, name: string }
Example for checking user rights
Code Block |
---|
{% if userRights contains "ManageSharings" and userRights contains "ManageEmbeds" %}
<cp-dashboard-card
channelId="keywords"
imageWidth="250"
imageHeight="200"
title="Shares Page that will show only Embeds"
url='/shares?sort=%5B%7B"field":"audit.creationDate","direction":"Desc"%7D%5D&searchMode=and&filters=%5B%7B"aggregationName":"ShareType","filter":%7B"field":"shareType","term":"Embed","kind":"TermFilter"%7D,"kind":"AggregationFilter"%7D%5D'
imageUrl="https://images.unsplash.com/photo-1560007689-654552332adf"
>
</cp-dashboard-card>
{% endif %} |
Example for checking user role IDs
Code Block |
---|
{% if userRoleIds contains 'bc0f6581b236497fbddf3ff67bfd2459' %}
<section class="cards-section">
<cp-dashboard-card
channelId="keywords"
openInNewTab="true"
imageWidth="300"
imageHeight="200"
title="Picturepark Website"
url="https://picturepark.com"
imageUrl="https://picturepark.com/data/System/KEI-Automated-Testing-DO-NOT-DELETE/picturepark.png"
>
</cp-dashboard-card>
</section>
{% endif %} |
Anchor | ||||
---|---|---|---|---|
|
...