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.
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
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
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:
Image will be uploaded when post is submitted