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
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..
if i remove"{% entitylist key: page.adx_entitylist.id %} {%endentitylist%}" then also code is working fine.
Thanks Aprit, above information was very helpful.
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
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
Using that, you can get the Guid of your Entity List associated with your Web Page.
please could you also tell me about below syntax?
{% entitylist key: page.adx_entitylist.id %}
Hi Shahbaaz, please close the thread. Thanks
thank you Arpit it was very helpful
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156