Umbraco 6 looking for someNode.DescendantsOrSelf("nodeType")
Hello,
Starting in Umbraco 6 now, but I'm having trouble finding the methods I'm looking for (maybe I'm not looking for the right ones).
Basically I'm looking for someNode.DescendantsOrSelf("nodeType"), which I used to use a lot in older projects. How do we accomplish this now in Umbraco 6?
Umbraco 6 looking for someNode.DescendantsOrSelf("nodeType")
Hello,
Starting in Umbraco 6 now, but I'm having trouble finding the methods I'm looking for (maybe I'm not looking for the right ones).
Basically I'm looking for someNode.DescendantsOrSelf("nodeType"), which I used to use a lot in older projects. How do we accomplish this now in Umbraco 6?
Thanks!
You must reference the PublishedContentExtensions from the Umbraco.Web namespace. There you will find those methods.
Regards
Ohh I see! So this here would be right?
Is there a better (without casting) way of doing this?
Thanks!
Just add @using Umbraco.Web.PublishedContentExtensions and use the extension methods directly over Model.Content
Regards
Perfect! Thanks for the help!
Have tried to add the
but he tolds me that this is a type and not a namespace.
How can i use the Extensions?
Sitting on Umbraco 6.0.0.
Thanks in advance!
David, maybe you are missing a reference in your Visual Studio project?
is working on a reply...