CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

duplicating an entire site in one umbraco instance

1/29/2010 11:17:10 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160

Hi,

I need to create a duplicate site in Umbraco parallel to my main site for Spanish-language.  This raises a number of issues on which I'd love to get some advice from the pros out there.

The client wants the site to be completely separate since their maintainers will be separate.  So the first thing I'd like to know is, is there a quick way to copy an entire site?  Or do I have to literally recreate the new site in parallel?

The next issue is, how do I deal with the URLs once the site is populated in Umbraco?  I tried creating a second Home page, for example, and the system gave it the same URL / Page Name as the original Home page.  How is this possible?  I have to have some way of toggling between the two sites/languages but if their URLs are the same, how can I do this?  Do I really have to give an Umbraco URL Name to every single page in the Spanish site?

Also, I'll need to use dictionary items for text translations in the site navigation.  In the Edit Template interface, I see a button for "Insert Dictionary Item" but there is no such button in the Edit XSLT File interface.  I have to be able to use the dictionary here because obviously my navs are Macros.

Thanks,

Garrett

1/29/2010 11:21:14 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160
Comment with ID: 24844

Oh, another thing-- after you put in the dictionary tags, how does Umbraco "know" which language to use?

1/29/2010 11:25:08 PMAvatarPaul SterlingLocation: Bellingham, WashingtonMVP.Core.posts: 399Karma: 246
Comment with ID: 24846

Garrett -

A few quick searches on this site will get you most of the way to your answers.  For starts have a look at these entries:

our.umbraco.org/.../running-multi-lingual-sites-under-a-single-domain

umbraco.org/.../multilingual-11-sites

The later is a walk-through of creating a multi-lingual site.

-Paul

2/8/2010 9:45:41 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160
Comment with ID: 25715

Thanks a lot, Paul-- I will try to follow these directions.  Howeevr, I still need to know if I there is some way of duplicating the site.  There are hundreds of pages.  I don't have to create these subsites one page at a time, do I?!

//Garrett

2/8/2010 10:32:50 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160
Comment with ID: 25720

I discovered the ability to copy the nodes, and that's done. 

But, and this is a BIG but, as a result of changing the architecture of the site so fundamentally (according to this Wiki tutorial: our.umbraco.org/.../running-multi-lingual-sites-under-a-single-domain) every single Macro on the site is broken.  I find the tutorial to bye incomplete.  I assigned the subdomains to the different sub-home-pages but I'm still not really sure how this is going to work, how to navigate around the site. 

Do I need two copies of every Macro, since their root nodes will be different?  For example, my sitemap? One will need to iterate through all noides under the English home page, and the other one the Spanish?  This doesn't seem like a very good plan to me.

//Garrett

2/8/2010 10:34:33 PMAvatardandrayneLocation: Edinburghposts: 893Karma: 1649
Comment with ID: 25722

Hi Garrett

When I'm creating a new language in a multi-lingual site, I start by copying the entire site - homepage and all - by just right-clicking and copying to under the content node.  From here I assign hostnames to the new copy and start the translation process. 

Is this what you mean?  If so, it's totally possible.  When you assign hostnames with your chosen language (after adding the language to the dictionary) the dictionary knows which one to use.  To assign a hostname right-click on the new homepage node.

Dan

2/8/2010 10:37:38 PMAvatardandrayneLocation: Edinburghposts: 893Karma: 1649
Comment with ID: 25723

With regards to homepage nodes, you may need to change your xslt to compensate but after you do it once it will be easy from then on. Having said that, if you're finding your homepage by looking back up the tree to level one for a node of type "homepage" it should still work.

You should be able to use the same macros throughout the site without much issues.  Feel free to post back with specific problems with your macros in the new site.

2/9/2010 6:41:48 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160
Comment with ID: 25825

Hi Dan,

Really appreciate your response.  I'm still totally confused though!  I have so many issues I don't know where to begin because practically everything is broken ever since I created a global home page and put the two sites underneath it. 

1.) I assigned no hostname to my global home page, as instructed, then en.localhost to one of the subsites and es.localhost to the other.  Assuming I get the Macros working again (a whole other issue, as on most of them I have picked the root node using the media picker as a parameter of the Macro), how will I toggle between the two sites?? They have the same URL.  Which I don't get.

2.) The Macros.  You said "finding your homepage by looking back up the tree to level one for a node of type "homepage".  I'm not.  I'm just using pretty much a standard Navigation XSLT template.  Eg. below:

<xsl:for-each select="$currentPage/descendant-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">

Where the $level variable is set to 2 since my individual home pages are at level 2.  Naturally, these links are being written twice since there are two home pages.  If you can make me understand how to fix This then that would go pretty far and we can go from there.

Thanks again,

Garrett

2/9/2010 8:49:24 PMAvatardandrayneLocation: Edinburghposts: 893Karma: 1649
Comment with ID: 25834

Do you have a content tree like the following?

*  Content 
** Homepage (eng)
*** Subpage
*** Subpage
** Homepage (fr)
*** subpage
*** subpage

In this situation, your homepages are at level 1 and your subpages are at level 2, regardless of which language they are applied to.

If (as i'm starting to suspect might be the case) your subpages are at level 1 and beside the homepage/straight underneath the content node, you'll have more problems duplicating the site and creating mulitlingual sites in the future.

Dan

2/9/2010 8:58:58 PMAvatarGarrett FisherLocation: New York, NYposts: 130Karma: 160
Comment with ID: 25835

Hi,

No, my structure is:

* Content
** Home
*** Home (EN)
**** Subpage
Subpage
*** Home (ES)
**** Subpage
**** Subpage

I was under the impression that I was supposed to create a Global home page, under which the language-specific home pages would reside.  Is this not the case?

//Garrett

 

2/10/2010 10:33:05 AMAvatardandrayneLocation: Edinburghposts: 893Karma: 1649
Comment with ID: 25879

The global homepage isn't necessary.  Have you always had this?  If not, you can safely remove it.

Pages:

Please login or Sign up To post replies