Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dominic Pettifer 51 posts 50 karma points
    May 04, 2009 @ 17:49
    Dominic Pettifer
    0

    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!

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 04, 2009 @ 20:22
    Richard Soeteman
    0

    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

  • Dominic Pettifer 51 posts 50 karma points
    May 05, 2009 @ 13:06
    Dominic Pettifer
    0

    Sweet, that did the trick thanks!

Please Sign in or register to post replies

Write your reply to:

Draft