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
Hi all,
does anybody know how i could add node id's to a mntp in a SurfaceController.
Currently having a case where a user is able to create a new node from frontend and can relate it to some other nodes. Thought about saving the id's in a MNTP.
Are there any other methods?
David
Something like this?
var cs = Services.ContentService; var content = cs.GetById(UmbracoContext.PageId.Value); content.SetValue("YourMNTPPropertyAlias", "1234,1235,1236"); content.Save();
Works only if you're storing MNTP values as CSV of course. And it could be content.SaveAndPublish() if you want.
content.SaveAndPublish()
(oops, updated the above to also include the Save())
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Adding nodes to MNTP in Controller
Hi all,
does anybody know how i could add node id's to a mntp in a SurfaceController.
Currently having a case where a user is able to create a new node from frontend and can relate it to some other nodes. Thought about saving the id's in a MNTP.
Are there any other methods?
David
Something like this?
Works only if you're storing MNTP values as CSV of course.
And it could be
content.SaveAndPublish()
if you want.(oops, updated the above to also include the Save())
is working on a reply...