I have shared an Asset Type called "Article" from avisports site to my site.
i created an Asset for Article in my contributor interface. Now i would like to print one of the attribute value of that Article asset.
I tried the below code but it is not working. please help me.
I don't know how to get the Asset id dynamically so i just hardcoded it.
<assetset:setasset name="Sample" type="Article" id='1337377897396' />
<asset:get name="Sample" field="Headline" output="printHL" />
You could reference the article template in avisport or you can check the developer guide (http://docs.oracle.com/cd/E29495_01/doc.1111/webcenter_sites_11gr1_bp1_developer_guide.pdf) pg.634 - Coding Templates That Display Flex Assets
Note: the type is available as c variable <%=ics.GetVar("c")%> and the id should be available as cid variable <%=ics.GetVar("cid")%>
<assetset:setasset name="theAsset" type='Article' id='1337377897396' />
<assetset:getattributevalues name="theAsset" attribute="Headline" typename="your flex attribute typename" listvarname="HeadineList" />
<ics:listget listname="HeadineList" fieldname="value" />
where typename in the second line should be the flex attribute typename for Headline (similar to Media_A).