Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
the alternative to document.Published ?
When I use the document.Published it says it's obsolute and I should use Umbraco.Core.Models.Content but when I make a content node Like this
Umbraco.Core.Models.Content node = new Umbraco.Core.Models.Content(Name, ParentId, contentType);
I can't get the node values like this then it will say the value is empty.
item.GetValue("property-Name").ToString()
Dan,
Me thinks you need to save your node first before getting any value from any property. Saving of your node has to be done via content service. More info on the new api (and more specifically services) can be found here
Cheers,
DIrk
I got data in the database, and I can get the node value like this on the document
document.getProperty("property-Name").Value.ToString()
Im guessing it's because it's a new object not related to the one in the database ?
this must work ? contentService.GetById()
Think I got it now
I got confused by how you get a node
Node newNode = new Node(1234);
then I thought you should do the same with Umbraco.Core.Models.Content
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
alternative to document.Published
the alternative to document.Published ?
When I use the document.Published it says it's obsolute and I should use Umbraco.Core.Models.Content but when I make a content node Like this
I can't get the node values like this then it will say the value is empty.
Dan,
Me thinks you need to save your node first before getting any value from any property. Saving of your node has to be done via content service. More info on the new api (and more specifically services) can be found here
Cheers,
DIrk
I got data in the database, and I can get the node value like this on the document
Im guessing it's because it's a new object not related to the one in the database ?
this must work ? contentService.GetById()
Think I got it now
I got confused by how you get a node
then I thought you should do the same with Umbraco.Core.Models.Content
is working on a reply...