Cms Examples

Note that cms.exists() has been deprecated in favour of channel.contains().

Smartsite SXML CopyCode image Copy Code
Does item 12345678 exist: {channel.contains(12345678)}<br/>
GetDepth for item 150: {cms.getdepth(150)}<br/>
GetItemCode: {cms.getitemcode(150)}<br/>
GetItemNumber: {cms.getitemnumber(MACROS)}<br/>
GetParent: {cms.getparent(150)}<br/>
IsChildOf: {cms.ischildof(150,4529)}<br/>
IsFolder: {cms.isfolder(4529)}<br/>
IsMemberOfSubTree: {cms.ismemberofsubtree(150,12863)}<br/>
IsMemberOfAnySubTree: {cms.ismemberofanysubtree(150,2,12863)}<br/>
Example Result CopyCode image Copy Code
Does item 12345678 exist: false<br />
GetDepth for item 150: 4<br />
GetItemCode: MACROS<br />
GetItemNumber: 150<br />
GetParent: 4529<br />
IsChildOf: true<br />
IsFolder: true<br />
IsMemberOfSubTree: false<br />
IsMemberOfAnySubTree: true<br />