Skip to content

Instantly share code, notes, and snippets.

@aakash14goplani
Created July 10, 2019 14:50
Show Gist options
  • Save aakash14goplani/84547531e341fbb6daf7dfd7f0d24c85 to your computer and use it in GitHub Desktop.
Save aakash14goplani/84547531e341fbb6daf7dfd7f0d24c85 to your computer and use it in GitHub Desktop.
Asset Reference

Builds a list of assets that reference this asset.

<asset:load name="loadReferences" type="[c]" objectid="[cid]"/>
<asset:referencedby name="loadReferences" list="referenceList" embeddedreflist="embeddedReferenceList" />	

Assets: <br>
<ics:if condition='<%=null!=ics.GetList("referenceList") && ics.GetList("referenceList").hasData()%>'>
  <ics:then>
		<ics:listloop listname="referenceList">
			<ics:listget fieldname="oid" listname="referenceList"/> : 
		  <ics:listget fieldname="otype" listname="referenceList"/><br>
	  </ics:listloop>
  </ics:then>
</ics:if>

<br>Embedded Assets: <br>
<ics:if condition='<%=null!=ics.GetList("embeddedReferenceList") && ics.GetList("embeddedReferenceList").hasData()%>'>
  <ics:then>
    <ics:listloop listname="embeddedReferenceList">
			<ics:listget fieldname="oid" listname="embeddedReferenceList"/> : 
		  <ics:listget fieldname="otype" listname="embeddedReferenceList"/><br>
	  </ics:listloop>
  </ics:then>
</ics:if>

Reference

asset:referencedby

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