tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/14166-system-asset-linking-to-system-data-structureCascade CMS: Discussion 2016-06-27T20:56:27Ztag:help-archives.hannonhill.com,2010-02-09:Comment/398491072016-05-11T19:09:37Z2016-05-11T19:09:37ZSystem-asset linking to system-data-structure<div><p>Hi Brendon,</p>
<p>What you have should definitely work. Curious, but have you
tried using the <code>link</code> instead of <code>path</code>? If
you are generating these links within a different Site, you will
need cross-Site links in order for them to be linked to the correct
asset.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/398491072016-05-11T19:23:14Z2016-05-16T13:11:39ZSystem-asset linking to system-data-structure<div><p>The link didn't work for me either, but when I looked at using
the link, it was taking the parent folder's link and then appending
the data definitions name so I assumed that was the issue.</p>
<p>I've included a sample xml and heres an example of the
script</p>
<pre>
<code>#set($contactSpifs = $_XPathTool.selectNodes($contentRoot, "//system-block/system-data-structure[@definition-path='page-spifs/contact-spif']"))
<h1>Contact Spifs</h1>
<div class="col col-100">
#foreach($spif in $contactSpifs)
<div class="spifcontainer">
#renderSpif($spif)
#set($link = "" + $spif.parent.parent.getChild('path').value + "")
<a href="[system-asset]${link}[/system-asset]">Link</a>
</div>
#end
</div></code>
</pre></div>birwintag:help-archives.hannonhill.com,2010-02-09:Comment/398491072016-05-16T13:30:40Z2016-05-16T13:30:40ZSystem-asset linking to system-data-structure<div><p>Hi Brendon,</p>
<p>Very interesting about using the link. Testing locally, I was
not seeing what you described (with the Data Definition name). Here
is what I am getting:</p>
<pre>
<code><a href="[system-asset]site://students.wlu.ca/_cascade/asset factories/spifs[/system-asset]">Link</a></code>
</pre>
<p>Were you able to get things working?</p>
<p>Thanks!</p></div>Ryan Griffith