1. Use the "umbracoInternalRedirectId" property to redirect (or re-use) the content from a different node. So you could set-up your sub-domains to redirect to the primary content node?
2. Write a HttpModule to intercept the page request (before it gets to umbraco.UmbracoDefault.OnInit) and set the "altTemplate" to the template alias that you want to use. You can do this via the HttpContext Items:
3. You could inherit from and replace the UmbracoDefault page class in "default.aspx" ... and put the logic to set the Template (if you know the Id) in there.
There are many ways to tackle this... just got to choose which is best for you.
Cheers, Lee.
PS. It's a small world, I grew up near Wigan, in Hindley Green - but that was many years ago!
Im interetested in using the option you suggested "HttpModule to intercept the page request " I am quite new to c# and I am not really sure were to start with this, could you expand a bit on the suggestion?
Dynamic Node Template
Hi,
Does anyone know how to dynamically change the template on a node?
Basically my issue is I want to display a node using a different template when requested from a subdomain.
Currently I duplicate the nodes so there would be:
etc..
However this is becoming a little unmanageable as I am looking to add some more subdomain.
Has anyone any ideas?
Hi John,
There are a few ways you could tackle this...
1. Use the "umbracoInternalRedirectId" property to redirect (or re-use) the content from a different node. So you could set-up your sub-domains to redirect to the primary content node?
2. Write a HttpModule to intercept the page request (before it gets to umbraco.UmbracoDefault.OnInit) and set the "altTemplate" to the template alias that you want to use. You can do this via the HttpContext Items:
3. You could inherit from and replace the UmbracoDefault page class in "default.aspx" ... and put the logic to set the Template (if you know the Id) in there.
There are many ways to tackle this... just got to choose which is best for you.
Cheers, Lee.
PS. It's a small world, I grew up near Wigan, in Hindley Green - but that was many years ago!
I'll have a look into the different solutions, thanks.
P.S.
It must be a very small world, I live in Hindley Green lol
Hey Lee
Im interetested in using the option you suggested "HttpModule to intercept the page request " I am quite new to c# and I am not really sure were to start with this, could you expand a bit on the suggestion?
many thanks
Lachlann
is working on a reply...