I am trying compare the value of the content id of an items in a slot with a value that was created on a page that called this template. I want to then use the value of $parentInSubNav to see if I should display the slot later in the page.
My syntax to return the content id of the slot seems to be incorrect, any ideas on this would be appreciated.
## Find if calling page is in the subnav
#if($sys.currentslot.relresults.size() > 0)
#foreach( $relresult in $sys.currentslot.relresults )
#if($relresult.getProperty('sys_contentid').String == $navCallId)
#set($parentInSubNav = "y")
Remember that the “results” in a slot are IPSAssemblyResult objects, and this interface doesn’t have a “getItem()” method. I suspect that you want the “getNode()” method (if your next step is to call getProperty())