In the example below we set up the assets as in Assign Asset Attribute to a Variable and Output to Screen and assign them to the output variable named pageID.
In the second section we are calling the render:calltemplate tag to render the template you specify. The template we are calling in this example is /SideNavTopLinks the / is used to denote a Typeless template. Most Templates used will be without the / and so will be Typed templates. We feed the pageID var into the cid attribute of the render:calltemplate tag.
In the example below we close the tag but it is also possible to use a self-closing tag e.g.
<render:calltemplate..... /> or
<render:calltemplate ...></render:calltemplate>. In this example I am rendering a MenuLink which is an arrribute of my Asset. I am using the tempate called myLinks to display this asset.
<assetset:setasset name="pageMenuAsset" type="MenuLink" id="<%=ics.GetVar("MenuListID")%>"/> <assetset:getattributevalues name="pageMenuAsset" typename="Ass" attribute="MenuLinkPage" listvarname="MenuLinkPageList"/> <ics:listget listname="MenuLinkPageList" fieldname="value" output="pageID" /> <render:calltemplate tname="/myLinks" site="<%=ics.GetVar("site")%>" tid="<%=ics.GetVar("tid")%>" slotname="myLinkSlot" c="Page" cid="<%=ics.GetVar("pageID")%>" ttype="Template" context=""> </render:calltemplate>
I hope you found this useful or if you have any questions don't hesitate to leave a comment or contact support[@]tomred[.]net
I have spent most of my time working on these little bits of logic or snippets. These come from problems or issues I have encountered over the year. These are insights I have researched or provided as code review feedback.
During my time working in consulting I was tasked many times with delivering FatWire sites. I took notes due to the lack of useful documentation at the time. These are the results of those notes made and shared.
I believe the majority of time on a project is spent with the UI. Web is no exception. I have compiled a set of articles covering HTML, CSS and JS with the intention of taking the sting out of this work.
A space dedicated to all those things you need to know beyond writing code. This covers Linux, Windows, Git and SVN among other hopefully useful nuggets.
I picked up some pointers over the years consulting for government and banking sectors before entering a PCI DSS development environment. This section covers aspects like coding, testing, code review and best practice.
Apps is a section which offers access to bits and pieces I have put together over the last few years. This includes Random Password Generator and Base64 Encoder.