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
I m working on a Real Estate Website project using Umbraco 7.7.2 using peta pocco style to save properties in custom database. Where I am stuck at the moment is, whenever I create a property, I want a "content page" for it's detail information to be created dynamically based on an already existing document type in the Umbraco backoffice. so the editor won't have to create the detail content page manually.
I am trying to use Content Services but no luck so far. am I going in the wrong direction. below is the code snippet I am trying right now,
ContentType ct = new ContentType(contentType);
ContentService cs = (ContentService)ApplicationContext.Current.Services.ContentService;
UserService us = (UserService)ApplicationContext.Current.Services.UserService;
Int uid = us.GetByUsername("sahar").Id;
// Create the document
Content home = (Content)cs.GetById(1059);
Content c = (Content)cs.CreateContent(nodeName, home, ct.Alias, uid);
Quick help will be appreciated a lot.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted