tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/19965-using-locateblock-to-select-node-valueCascade CMS: Discussion 2015-10-26T14:22:17Ztag:help-archives.hannonhill.com,2010-02-09:Comment/382829302015-10-23T23:23:43Z2015-10-25T15:46:37Zusing locateBlock to select node value<div><p>Since you have chosen to use the Locator tool, the block XML is
no longer available to you. Instead, you need to work with
structured data. See my discussion on <a href="http://help.hannonhill.com/discussions/velocity-formats/12619-accessing-system-data-structure-with-the-locator-tool">
Accessing system-data-structure with the Locator Tool</a>.</p>
<p>I am also working on <a href="http://www.upstate.edu/cascade-admin/formats/velocity/course/lesson10.php">
Lesson 10: Structured Data and Metadata</a>, taking about this, in
my tutorial site.</p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/382829302015-10-26T14:05:29Z2015-10-26T14:05:29Zusing locateBlock to select node value<div><p>Hi Prashanth,</p>
<p>As Wing mentioned, you will need to use the Cascade API to
access your Block's structured data. In your case the following
would give you access to each individual file chooser:</p>
<ul>
<li>
<code>$imageUploader.getStructuredDataNode("image1")</code></li>
<li>
<code>$imageUploader.getStructuredDataNode("image2")</code></li>
<li>
<code>$imageUploader.getStructuredDataNode("image3")</code></li>
</ul>
<p>Alternatively, you could loop over all of the nodes assuming you
need to access each of the choosers and the block's data definition
won't be changing:</p>
<pre>
<code>#foreach ( $imageField in $imageUploader.structuredData)
#if (!$_PropertyTool.isNull($imageField.asset))
$imageField.asset.link
#end
#end</code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/382829302015-10-26T14:18:44Z2015-10-26T14:18:44Zusing locateBlock to select node value<div><p>Thank you Wing & Ryan. It worked.<br>
To get value, I used,</p>
<p>$imageUploader.getStructuredDataNode("image1").asset.link
$imageUploader.getStructuredDataNode("image2").asset.link
$imageUploader.getStructuredDataNode("image3").asset.link</p>
<p>(foreach loop also worked as Ryan suggested)</p>
<p>Thanks,<br>
Prashanth</p></div>Prashanthtag:help-archives.hannonhill.com,2010-02-09:Comment/382829302015-10-26T14:22:15Z2015-10-26T14:22:15Zusing locateBlock to select node value<div><p>Thank you for following up, Prashanth, I am glad to hear you
were able to get your Format working.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffith