Skip to content

Instantly share code, notes, and snippets.

@aakash14goplani
Last active July 10, 2019 14:27
Show Gist options
  • Save aakash14goplani/ef74643380ae9420b972f37bca20f6e5 to your computer and use it in GitHub Desktop.
Save aakash14goplani/ef74643380ae9420b972f37bca20f6e5 to your computer and use it in GitHub Desktop.
Search Shared Assets

Search assets that are shared with multiple sites

To search that a given asset is shared amongst sites we use asset:sites tag

<asset:load name="loadReferences" type="[c]" objectid="[cid]"/>
<asset:sites list="sharedSites" name="loadReferences"/>
  <ics:if condition='<%=null!=ics.GetList("sharedSites") && ics.GetList("sharedSites").hasData()%>'>
    <ics:then>
      <ics:listloop listname="sharedSites">
        <ics:listget fieldname="id" listname="sharedSites"/> : 
	<ics:listget fieldname="name" listname="sharedSites"/> :
	<ics:listget fieldname="description" listname="sharedSites"/><br>
      </ics:listloop>
    </ics:then>
  </ics:if>

References

asset:sites
asset:share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment