Yeah I've done this, just a bit neater on the code if I have two seperate roots that can switch by command, I have just created partials on the top one that does different things depending on what the switch is set to, but it's bad practice (codewise) to do it this way.
Instead of having the pages as root nodes, you could create a site node that has the domain set. On the site you can then create a property (a content picker) that has the alias “umbracoInternalRedirectId”. When this property has a value, umbraco will show this page instead of the selected page.
This solution will allow you to have different frontpages, but will not handle child pages — ie their url will still be https://domain/site1/page1, even if “/site1” is disaplyed on “/“
I went with the original method that I wanted to get away from by using the two root nodes, then I used a switch on the root to alter what data was displayed by using partials to render the homepage and navbars and just passed a different root into the partial.
Temporary URL rewrites/redirect or change the website to use a different tree?
So if we have 2 root nodes, is it possible to switch between using one or the other as the webroot using a switch on one of the nodes?
Damien Holley, peace be upon those who follow guidance.
In case you need to set one of the root nodes as the default one (
domain/
) I suggest that you sort them and make your preferred one in the top.Yeah I've done this, just a bit neater on the code if I have two seperate roots that can switch by command, I have just created partials on the top one that does different things depending on what the switch is set to, but it's bad practice (codewise) to do it this way.
It is important to have it fixed, I suggest that you select the best solution for this thread.
Hi,
Instead of having the pages as root nodes, you could create a site node that has the domain set. On the site you can then create a property (a content picker) that has the alias “umbracoInternalRedirectId”. When this property has a value, umbraco will show this page instead of the selected page.
This solution will allow you to have different frontpages, but will not handle child pages — ie their url will still be https://domain/site1/page1, even if “/site1” is disaplyed on “/“
Yeah I was trying to avoid too many parameters in the url. Thanks though I was thinking of this method.
I went with the original method that I wanted to get away from by using the two root nodes, then I used a switch on the root to alter what data was displayed by using partials to render the homepage and navbars and just passed a different root into the partial.
Bit of a bad solution, but it does the job.
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.