My client has a main site and has now requested to add a second site, but they want part of the main site's content to exist on the second site (hundreds of pages in a tree structure) so they only have to update some of the content in one spot. I've got everything else up and running but I can't quite determine what the best (and easiest) approach to solve this would be.
They essentially want their entire product catalogue to exist on two websites in the same Umbraco installation - but on two different domains using slightly different templates for each site. They do not differ more than I can solve the differences in swapping out stylesheets and using macros to differentiate logos etc.
I was thinking about using the umbracoInternalRedirectId property but that doesn't seem to work for all of the page's child-pages.
Any other ideas other than having to program my way out of this?
Hi Tony
I've done a few sites like this.
In my umbraco content section, I usually have a root node called root, which doesn't do anthing, then I have a home page for each site. In each home page node I right click and set the Culture and Hostnames for the relevant url.
That will get the sites running on 2 different domains in the same umbraco instance.
If use models with your views, you will be able to get the controller to load the model with data from the main site and render it in the view.
You can add extra properties to the model to distinguish which site you are on, so you can do things slightly different on each site.
I'm not sure if this is any help, but with our existing CMS (not Umbraco yet, but soon), we have set up multiple sites in IIS from one instance of an ASP.NET site.
Each site has an unique starting node (or page id in our case), so when we create a new site in IIS which points to the same ASP.NET site on the server, we set the default document to point at this starting node.
It works, but we have checks in place to make sure that you can't browse to another site accidentally, i.e. outside the current domain, and it helps that the site is tree structured. Each sub-site can have it's own templates and style sheets, and our existing CMS allows us to embed content from one page in another.
It might be worth considering a similar approach (we intend to) for Umbraco.
I think you might have misunderstood what I'm looking to do. I already have two sites with different domain names running on the same Umbraco installation on two different main nodes. But - on the original website (lets call it Site1) there's a bunch of pages (a complete node structure of product categories and products) that I need to replicate into the second site (lets call that Site2) and keep up to date - to make sure everything is searchable etc.
What I'm thinking I'd prefer is actually a sync from Site1 to Site2 whenever there's an update being made to a page. Alternatively an update that runs once per day. So from what I can gather I'd need to do the following:
1) Do a complete sync from Site1 to Site2 and note the source DocID and the target DocID in a database table somewhere. This is the easy part.
2) Catch any events if a user inserts, deletes or updates documents within that portion of the site and make sure the update is carried over. I can see a few challenges here.
Question is - is there any existing package that allows this?
If you already have both sites can you copy the start of the products branch using the backoffice ui selecting the relate on copy option and move it to the tree of site 2.
At this point relationships will be set up for every node in that section and the original.
Using the content service events as your trigger using the relation service you can check if there is a paralel document needing action deletion or update.
When saving newly created documents in the products section you would see if the parent has a an equivalent in another tree using the relation and create a second document there at the same level. I imagine you would need to keep creating these relations for new documents to keep everything in sync.
Unfortunately there is no package i know of to just make the backoffice behave this way.
I have tried umbracoInternalRedirectId on a test site (having just found out about it) and although it works perfectly, I'm not sure how it would work across domains.
Sorry,
Muiris
PS: The screenshot shows my test - after setting up the following...
Same content across multiple domains
Hey all,
My client has a main site and has now requested to add a second site, but they want part of the main site's content to exist on the second site (hundreds of pages in a tree structure) so they only have to update some of the content in one spot. I've got everything else up and running but I can't quite determine what the best (and easiest) approach to solve this would be.
They essentially want their entire product catalogue to exist on two websites in the same Umbraco installation - but on two different domains using slightly different templates for each site. They do not differ more than I can solve the differences in swapping out stylesheets and using macros to differentiate logos etc.
I was thinking about using the umbracoInternalRedirectId property but that doesn't seem to work for all of the page's child-pages.
Any other ideas other than having to program my way out of this?
Thanks!
Anyone? :-)
Hi Tony I've done a few sites like this. In my umbraco content section, I usually have a root node called root, which doesn't do anthing, then I have a home page for each site. In each home page node I right click and set the Culture and Hostnames for the relevant url.
That will get the sites running on 2 different domains in the same umbraco instance.
If use models with your views, you will be able to get the controller to load the model with data from the main site and render it in the view. You can add extra properties to the model to distinguish which site you are on, so you can do things slightly different on each site.
I hope that helps.
Paul
I'm not sure if this is any help, but with our existing CMS (not Umbraco yet, but soon), we have set up multiple sites in IIS from one instance of an ASP.NET site.
Each site has an unique starting node (or page id in our case), so when we create a new site in IIS which points to the same ASP.NET site on the server, we set the default document to point at this starting node.
It works, but we have checks in place to make sure that you can't browse to another site accidentally, i.e. outside the current domain, and it helps that the site is tree structured. Each sub-site can have it's own templates and style sheets, and our existing CMS allows us to embed content from one page in another.
It might be worth considering a similar approach (we intend to) for Umbraco.
I think you might have misunderstood what I'm looking to do. I already have two sites with different domain names running on the same Umbraco installation on two different main nodes. But - on the original website (lets call it Site1) there's a bunch of pages (a complete node structure of product categories and products) that I need to replicate into the second site (lets call that Site2) and keep up to date - to make sure everything is searchable etc.
What I'm thinking I'd prefer is actually a sync from Site1 to Site2 whenever there's an update being made to a page. Alternatively an update that runs once per day. So from what I can gather I'd need to do the following:
1) Do a complete sync from Site1 to Site2 and note the source DocID and the target DocID in a database table somewhere. This is the easy part.
2) Catch any events if a user inserts, deletes or updates documents within that portion of the site and make sure the update is carried over. I can see a few challenges here.
Question is - is there any existing package that allows this?
If you already have both sites can you copy the start of the products branch using the backoffice ui selecting the relate on copy option and move it to the tree of site 2.
At this point relationships will be set up for every node in that section and the original.
Using the content service events as your trigger using the relation service you can check if there is a paralel document needing action deletion or update.
When saving newly created documents in the products section you would see if the parent has a an equivalent in another tree using the relation and create a second document there at the same level. I imagine you would need to keep creating these relations for new documents to keep everything in sync.
Unfortunately there is no package i know of to just make the backoffice behave this way.
Pretty sure that's the best solution to the problem too :-)
Nope sorry, I don't know of any package either.
I have tried umbracoInternalRedirectId on a test site (having just found out about it) and although it works perfectly, I'm not sure how it would work across domains.
Sorry,
Muiris
PS: The screenshot shows my test - after setting up the following...
... Umbraco handles the rest
Works great as such, but not for the page’s child nodes and doesn’t work with the XSLTSearch I’ve implemented for the sites.
is working on a reply...