I just install and try Umbraco 8. In Umbraco 7 I often use something like:
var posts = Umbraco.TypedContent(Node's Id number);
To work with that Node Content, but now I can't use it. I got error "TypedContent doesn't exsist in Umbraco namespace", so how to use get a Node Content in new Umbraco?
Thanks for your reading and sorry for my bad English.
(now that 'dynamics' has been removed, there is just the IPublishedContent way to pull things back, so no need to have the word Typed in the method name
Cant use TypedContent in Umbraco 8
Hello there,
I just install and try Umbraco 8. In Umbraco 7 I often use something like:
var posts = Umbraco.TypedContent(Node's Id number);
To work with that Node Content, but now I can't use it. I got error "TypedContent doesn't exsist in Umbraco namespace", so how to use get a Node Content in new Umbraco?
Thanks for your reading and sorry for my bad English.
Hi Nguyen
It's been simplified to be:
var posts = Umbraco.Content(Node's Id number);
(now that 'dynamics' has been removed, there is just the IPublishedContent way to pull things back, so no need to have the word Typed in the method name
regards
Marc
The method has moved to
Try
var posts = Umbraco.Content(1234);
instead ;)Edit: duh.. I was much to slow in answering that one 😂
Hello everyone,
I really impressed with the Umbraco community. Thanks for all your supports.
I still got the problem
This is my current code
I think I may miss something when install the project
Your view is not inheriting from any of the umbraco pages, so it tries to use the umbraco namespace, and not the umbracohelper.
Try addding something like this
at the top of the view
is working on a reply...