- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get page content structure in CAAS chnanel
Hi All,
I'm developing the caas o/p channel for articles in page content. So, my requirement is to get the complete structure please refer below image for more details which need to print in caas
.
I want about structure to be generated in caas O/p channel
So, I've tried using #global.page.getParent().getName() methods. if it good also , if I can able to get name of the folder & article name for the same.
But it seems to be not working
Please help for the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tanmay,
We currently have the same requirement and came up with a possible solution:
<CMS_HEADER>
<CMS_FUNCTION name="Navigation" resultname="getNav">
<CMS_PARAM name="expansionVisibility" value="pathonly"/>
<CMS_PARAM name="wholePathSelected" value="1"/>
<CMS_VALUE_PARAM name="root" value='"pagefolder:"+ss_navigation_root' />
<CMS_PARAM name="siteMap" value="1" />
<CMS_ARRAY_PARAM name="selectedHTML">
<CMS_ARRAY_ELEMENT index="0..10">
<![CDATA[$CMS_TRIM(level:4)$
/$CMS_VALUE(#nav.ref.getFilename().replace("_", "-"))$
$CMS_SET(prevLabel,#nav.ref.getFilename())$
$CMS_END_TRIM$]]>
</CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
<CMS_ARRAY_PARAM name="pageRefRendering">
<CMS_ARRAY_ELEMENT index="0..10"><![CDATA[$CMS_TRIM(level:4)$
$CMS_IF(prevLabel.equals(#global.node.getFilename()) == false)$
/$CMS_VALUE(#global.node.getFilename().replace("_", "-"))$
$CMS_END_IF$
$CMS_SET(prevLabel,#global.node.getFilename())$
$CMS_END_TRIM$]]></CMS_ARRAY_ELEMENT>
</CMS_ARRAY_PARAM>
</CMS_FUNCTION>
</CMS_HEADER>
{
"url": "$CMS_VALUE(getNav)$",
"pageData": $CMS_VALUE(#global.page.toHtml())$
}
We use the "Navigation" CMS Function here to create the path and then append it to the json of the page with the "url" key.
The result will look like this for example:
{
"url": "/ratgeber/foerdermittel/kfw-programme-im-ueberblick",
"pageData": {"fsType":"Page",...}
}
I hope I could help you
Timon

