It looks like you are trying to use dynamics in your screen shot. I can't be sure though as it's partly hidden.
But, Umbraco 8 doesn't have support for dynamics and as such you should look to re-write the code using strongly typed objects. I would suggest changing your GetSubNavigationList method to have a signature similar to the following:
public List<NavigationList> GetSubNavigationList(IPublishedContent page)
(note: I'm assuming that IPublishedContent is the correct interface but I can't remember if that changed in Umbraco V8 to have a different name).
You are still using dynamic objects. It is recommended you don't do this. The children of IPublishedContent are IPublishedContent so you'd be better off having strongly typed all the way though your code.
That will mean in order to access properties you'll have to use GetPropertyValue though :-)
Dynamic Navigation Menu in Umbraco CMS
Why occur this error??
try
Thanks Darren. But that is not worked.finally i pass that without filtering
Hi Pubudu,
It looks like you are trying to use dynamics in your screen shot. I can't be sure though as it's partly hidden.
But, Umbraco 8 doesn't have support for dynamics and as such you should look to re-write the code using strongly typed objects. I would suggest changing your GetSubNavigationList method to have a signature similar to the following:
(note: I'm assuming that IPublishedContent is the correct interface but I can't remember if that changed in Umbraco V8 to have a different name).
Nik
Thanks Nik. finally i pass that without filtering
Hi pubudu,
You are still using dynamic objects. It is recommended you don't do this. The children of IPublishedContent are IPublishedContent so you'd be better off having strongly typed all the way though your code.
That will mean in order to access properties you'll have to use GetPropertyValue though :-)
Nik
is working on a reply...