How do I then set up a hostname/domain on that document/node? It can be done in the UI by right clicking on node and selecting "Manage hostnames", but I can't find anything in the API to do this.
Try the domain object [code]umbraco.cms.businesslogic.web.Domain.MakeNew(domainName, rootNodeId, languageId)[/code] where rootNodeId is the Id of your document.
Setting up Hostnames on a Document via API
How do I manage hostnames via the Umbraco API? Eg. if I create a Document like this...
[code]Document newDoc = Document.MakeNew(pageName, docType, umbraUser, parentNodeId);[/code]
How do I then set up a hostname/domain on that document/node? It can be done in the UI by right clicking on node and selecting "Manage hostnames", but I can't find anything in the API to do this.
Cheers!
Hi Dominic,
Try the domain object [code]umbraco.cms.businesslogic.web.Domain.MakeNew(domainName, rootNodeId, languageId)[/code] where rootNodeId is the Id of your document.
Hope it helps you.
Richard
Sweet, that did the trick thanks!
is working on a reply...