Copied to clipboard

Flag this post as spam?

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


  • vijay 129 posts 152 karma points
    Jan 20, 2010 @ 14:15
    vijay
    0

    How to get Domain Names assigned to a node using API?

    How to get Domain Names assigned to a node using API?

    ---vijay.

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 20, 2010 @ 14:33
    Thomas Höhler
    0

    Take a look at umbraco.library.GetCurrentDomain(int nodeId)

    Thomas

  • Seth Niemuth 275 posts 397 karma points
    Jan 20, 2010 @ 15:34
    Seth Niemuth
    0

    To actually assign a domain name to a node, I don't think there is a method in the umbraco library for that. it looks like that happens in umbraco.cms.businesslogic.web.Domain. I would take a look at umbraco.cms.businesslogic.web.Domain.cs (in the source code). To see the example of how it is used you can look at presentation/umbraco/dialogs/AssignDomain.aspx.cs.

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 20, 2010 @ 15:52
    Thomas Höhler
    0

    Sorry, read false (how to get all domains from one node)...

    @Vijay: Didn't you asked this question before: http://our.umbraco.org/forum/developers/extending-umbraco/6056-How-to-assign-domain-to-a-node-programatically?p=0#comment21804

    Dirk pointed to a solution...

    Cheers, Thomas

  • vijay 129 posts 152 karma points
    Jan 21, 2010 @ 05:46
    vijay
    0

    Heelo Thomas,

    Thanks for your reply but my question is How to get the domain names assaigned to a node? and

    my previous question is How to assign domains to a node?

    cheers,

    --vijay.

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 21, 2010 @ 08:50
    Thomas Höhler
    0

    Sorry for the unconvenience Vijay, reacted on the comment from sniemuth without reading completely...

    So for the question How to get the domain names assaigned to a node? the solution would be the api call mentioned above:

    umbraco.library.GetCurrentDomain(int nodeId) where nodeId is the id of the node to get the domains from.

    hth,
    Thomas

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 21, 2010 @ 10:24
    Dirk De Grave
    0

    ...Or use Domain.GetDomainsById(nodeId) which returns an array of Domain 

     

    Cheers,

    /Dirk

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 21, 2010 @ 10:59
    Thomas Höhler
    0

    Which is the same, cause the library function uses Domain.GetDomainsById

    ;-)

Please Sign in or register to post replies

Write your reply to:

Draft