I added a sys_SingleCheckBox control called “menu_hide” to the rffNavon content type and am trying to access it from a top navigation template but I cannot seem to access the property.
#set($toplevel = $nav.root.getNodes("nav:submenu"))##
#foreach($navon in $toplevel)
Am I doing something wrong? I have restarted the server and recreated the navon to ensure all changes have propagated. I need to be able to hide navons from the top menu, if anyone has any other suggestions, please let me know.
When you have a single checkbox, the items where there is no “check mark” have a NULL value for that field. If you need (or want) two different values, use a radio button instead.
What error are you getting?
I have set up a checkbox field in navons. If a user selects it, that section of the web site is hidden from the top navigation panel (and put in a “fat footer” instead by a different navigation template.) It is tested like this:
#foreach ($navon in $nav.root.getNodes("nav:submenu"))##
## CODE TO DISPLAY LINKS IN TOP NAV
I guess the key is to set up the sys_SingleCheckBox field with a data type of “bool”.
Thanks Andrew, that’s exactly what I was trying to do.
I wasn’t getting an error, I was just not finding a value for the String property, changing it to Andrew’s code fixed the issue.