template question

I’m trying to figure out a way to have my templates use images based on whether or not the item being assembled is marked as “secure” (The images are already being published to both out open and secure folders and there is a field on most of our content types that designates them as secure or not).

This is what I have so far but I can oly get it to “look” at the navons (when I use $sys.item) not the actual content item being assembled. Any ideas? Has anyone done something similar?

if($PageThatContainsThisMenu.getProperty(‘rx:secure’).String == ‘s’)
<!-- rendering secure menu -->
tr>
renderSecureTopMenu()
td>img alt="" border=“0” height=“20” src=“https://secure.icao.on.ca/images/mainNav/spacer.gif” width=“1”/>
/td>
/tr>

else
<!-- rendering non-secure menu -->
tr>
#renderTopMenu()
td>img alt="" border=“0” height=“20” src="$icao_images/mainNav/spacer.gif" width=“1”/>
/td>
/tr>

end