tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/15900-get-data-from-assigned-pageCascade CMS: Discussion 2018-10-18T20:37:24Ztag:help-archives.hannonhill.com,2010-02-09:Comment/356989052015-01-05T21:58:58Z2015-01-05T21:58:58ZGet Data from Assigned Page<div><p>I'm using a calling-page block that appends the page data to
supply the data... I've tried to use the Locator Tool but don't
understand how to get the structured data from there, if that's
what it's for. I'm puzzled.</p></div>mark.jonestag:help-archives.hannonhill.com,2010-02-09:Comment/356989052015-01-06T13:39:13Z2015-01-06T13:39:13ZGet Data from Assigned Page<div><p>Hi Mark,</p>
<p>To answer your question, I have to make the following
assumptions:</p>
<ol>
<li>You have a data definition block, with either a page chooser or
a linkable chooser, attached to a page region of a page<br></li>
<li>You have a Velocity format attach to the same region at the
page level<br></li>
<li>The page chooser/linkable chooser is associated with a
page</li>
</ol>
<p>If my assumptions are accurate, then you can access the
structured data of the page by following these steps:</p>
<ol>
<li>Get the page information:</li>
</ol>
<pre>
#set ( $data = $_XPathTool.selectSingleNode( $contentRoot, "/system-data-structure" ) )
#set ( $page_chooser = $_XPathTool.selectSingleNode( $data, "group/page-chooser" ) )
#set ( $site = $_XPathTool.selectSingleNode( $page_chooser, "site" ) )
#set ( $path = $_XPathTool.selectSingleNode( $page_chooser, "path" ) )
</pre>
<ol>
<li>Get the page using the Locator tool</li>
</ol>
<pre>
#set ( $page = $_.locatePage( $path.value, $site.value ) )
</pre>
<ol>
<li>Once you have the page, you can call
<code>getStructuredDataNode</code> through the page object. See
<a href=
"http://help.hannonhill.com/discussions/velocity-formats/11061-using-locatorquery-tool-api-in-velocity-cascade-7122">
Using Locator/Query Tool API in Velocity (Cascade 7.12.2)</a> for
more information.</li>
</ol>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/356989052015-01-06T18:43:25Z2015-01-06T18:43:25ZGet Data from Assigned Page<div><p>Yes, your assumptions are fine. It took me a while to figure out
the path to the data that I want:
getStructuredData('path/to/data'). I think I'm all set now. Thank
you!</p></div>mark.jones