Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Liquid Template in Portal

Posted on by 6,203

Hi All,

Can anyone help me in understanding below liquid template,

1)  {% editable snippets 'Footer' type: 'html' %}

Question : I have Content snippet with name Footer, but what is editable?

2) {% assign footer_nav = weblinks["Footer"] %}

{% if footer_nav %}

{% if footer_nav.editable %}

Question : What is footer_nav.editable

3)  data-weblinks-maxdepth="2"

Thanks,

Shahbaaz

*This post is locked for comments

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Liquid Template in Portal

    Yes, It will work as I told earlier. It is only to inherit the Associated Entity List settings. If you do not want to inherit, Entiy View will work with the deafult setting configured in CRM View properties..

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Liquid Template in Portal

    if i remove"{% entitylist key: page.adx_entitylist.id %} {%endentitylist%}" then also code is working fine.

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Liquid Template in Portal

    Thanks Aprit, above information was very helpful.

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Liquid Template in Portal

    Hi Shahbaaz,

    First, understand the difference between Entity List and Entity View in Liquid Template code.

    Entity View - Loads a CRM view, by its name or ID.

    Entity List - Loads a Portal Entity List which can also have a CRM View, by name or ID.

    Point to be noted here is, Entity View does not have settings like Entity List like - Page Size, Searching, Filter Options etc). It is just a CRM View and contains only properties that we have done in CRM View Properties.

    Now lets understand below code- 

    {% entitylist key: page.adx_entitylist.id %}

    {% entityview logical_name: 'ewt_announcement' name:'Partner Announcements' %}

    {% endentityview %}

    {% endentitylist %}

     

    means,

     

    {%If webpage associated with an Entity List, inherit its property and set in below entityview, else not%}

    {% Load CRM View having logical_name: 'ewt_announcement' and name:'Partner Announcements' %}

    {% endentityview %}

    {% endentitylist %}

    entityview is nested within an entitylist block, which means it will inherit its default configuration (result page size, filter options, etc.) from the entity list. If no Entity List associated to webpage then it won't.

    If you do not provide view id or name(Partner Announcements) parameters to entityview, it will load the default view from the enclosing entitylist. So it is not mandatory to have Entity List associated with your Webpage.

    Hope I am able to make you understand.

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

     

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Liquid Template in Portal

    Hi Arpit,

    Here on my dashboard i have used below code for getting data from announcement entity(custom entity), Which is working fine. but my question is that which Guid it will bring and how?

    Below code is in "Dashboard" named web template and which is used in Page Template name "Home" now this page template is used in Web page name "Home Page".

    Note:  On "Home Page" which is web page Entity list is blank. so how did it bring guid?

    {% entitylist key: page.adx_entitylist.id %}

    {% entityview logical_name: 'ewt_announcement' name:'Partner Announcements' %}

    {% assign records = entityview.records | order_by: 'createdon', 'desc'%}

    {% for item in records %}

    {% assign posteddate = item.createdon | date: "M" %}

    {% assign formatteddate = posteddate | prepend: "<span>" | append: "</span>" %}

    {% assign message = " — " | append: item.ewt_announcementtext %}

    {% if item.ewt_link %}

    {% assign a = item.ewt_link | prepend: "<a href='" | append: "'>" %}

    {% assign message = message | prepend: a | append: "</a>" %}

    {% endif %}

    <li>{{ formatteddate | append: message  }}</li>

    {% endfor %}

    {% endentityview %}

    {% endentitylist %}  

    If i will find your answer helpful i will mark as Verified

    Thanks,

    Shahbaaz

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Liquid Template in Portal

    Using that, you can get the Guid of your Entity List associated with your Web Page.

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Liquid Template in Portal

    please could you also tell me about below syntax?

    {% entitylist key: page.adx_entitylist.id %}

  • Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Liquid Template in Portal

    Hi Shahbaaz, please close the thread. Thanks

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,203 on at
    RE: Liquid Template in Portal

    thank you Arpit it was very helpful

  • Verified answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Liquid Template in Portal

    The first parameter provided to editable is the editable object. For example, this may be a web link set, snippets, or the current page. But this is only for the users who is having editing/write permission for that object.

    For Example:

    {% assign primary_nav = weblinks["Primary Navigation"] %}
    {% if primary_nav.editable %} // this simply means whether the portal logged In user is having write/edit permission on weblinks["Primary Navigation"]

    {% endif %}

    Hope it is clear now.


    If found useful, please mark the answer as verified.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.com

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans