I have a very customised menu rendering in which I needto retreive various values from the navigation nodes in order to process them.
So I need access to the IPublished Content of the menu nodes but don't seem to be able to.
I need to do something like
navitem.Content.HasProperty("disableDropdown")
I realise I could accomplish some of this using the new properties on your nav item, but I didn't want to have to edit every item in the menu as these settings are already set on each of the content nodes.
'UmbNavItem' does not contain a definition for 'Content'
Hi,
I just installed the rc1 for this, however I am getting an error when trying to access the Content property of a UmbNavItem
CS1061: 'UmbNavItem' does not contain a definition for 'Content'
Hi Huw,
Can you supply an example of what you are trying to do, I can then see if I can replicate / help with this.
Also the Umbraco version (for example 8.x or 9)
Hi Aaron,
I have a very customised menu rendering in which I needto retreive various values from the navigation nodes in order to process them.
So I need access to the IPublished Content of the menu nodes but don't seem to be able to.
I need to do something like
I realise I could accomplish some of this using the new properties on your nav item, but I didn't want to have to edit every item in the menu as these settings are already set on each of the content nodes.
Thanks!
Can you confirm the Umbraco version please
Ok great I will take a look and get back to you.
FYI, I'll be tracking this here:
https://github.com/AaronSadlerUK/Our.Umbraco.UmbNav/issues/4
Thanks for looking in to it
I am using Umbraco 8.10.1
Ok so I found the issue, the property somehow got removed during the move from MegaNavV8 to UmbNav.
I have added it back, and a very quick test seemed to work.
Please update to 1.0.0-rc.2 and the Content property should be back. https://www.nuget.org/packages/Our.Umbraco.UmbNav.Web/1.0.0-rc.2
The code I used for testing:
Please let me know how you get on!
If this solves your issue please mark this topic as solved, thanks!
All working, many thanks for the quick fix
is working on a reply...