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 have an Umbraco install that runs multiple sites. So each home node has a unique hostname set.
Is it possible to run a query to get the node back by via the hostname? I need to do this within a custom INotFoundHandler?
Something like umbraco.library.GetNodeByHostname("www.mydomain.com") ....
Wouldn't you just go through the Domain class to get the relevant content id for the root of that domain?
var rootId = Domain.GetRootFromDomain("domain"); // the id of the root document
I don't think there is anything in the new API's for domain related stuff yet, or at least, I haven't seen it :)
Boom! Exactly what I was looking for... Thanks :)
Yay :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get Node By Hostname?
I have an Umbraco install that runs multiple sites. So each home node has a unique hostname set.
Is it possible to run a query to get the node back by via the hostname? I need to do this within a custom INotFoundHandler?
Something like umbraco.library.GetNodeByHostname("www.mydomain.com") ....
Wouldn't you just go through the Domain class to get the relevant content id for the root of that domain?
I don't think there is anything in the new API's for domain related stuff yet, or at least, I haven't seen it :)
Boom! Exactly what I was looking for... Thanks :)
Yay :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.