Multiple sites and their initial content

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
11/15/2010 8:02:26 AM
Gravatar
Total Posts 3

Multiple sites and their initial content

Hi guys,

Working with mojo for 3 weeks and really very excited...have read somewhere that you've been developing it over 5 years already.

Must say you did a great job!

After hours of googling your forum, I haven't found the answer to the following(please correct me if I'm following wrong approach):

1) I have different web solutions running on my local IIS.

How can I manage to setup multiple sites like mymojo and nl.mymojo based on virtual directory localhost\mymojo rather than root one.

2) I have successfully created setup package with initial content in english. Now I'd like to extend this and have an installation package with multiple(two) sites configured in different languages.

Thank You in advance.

Best Regards,

Andriy

11/18/2010 8:34:56 AM
Gravatar
Total Posts 3

Re: Multiple sites and their initial content

Come on :) this is urgent...

11/18/2010 9:45:00 AM
Gravatar
Total Posts 18439

Re: Multiple sites and their initial content

Hi,

mojoPortal can be installed in a root web site or a virtual directory, but to support multiple sites in a single installation it should be installed as a root site not as a virtual directory. Then you can either use host name based multiple sites with urls like mymojo.com and nl.mymojo.com

or, other way is to use folder based sites which also requires the first site to be a root level site like mymojo.com and then child sites can be like mymojo.com/nl but this is not a virtual directory in the sense of an IIS virtual directory.

If you want to work with such sites on your local machine you cannot do it using localhost/somefolder, you must work on your local machine as a root site either directly at localhost or you can create additional IIS web sites on your local dev machine instead of using the Default Web Site which maps to localhost.

This video should help you with learning about that

http://www.mojoportal.com/video-hosting-multiple-sites-based-on-host-name.aspx

Sorry but our installation system does not support configuration for creating multiple sites as part of installation. It creates one site and you would have to create the secondary sites from the administration of the first site. The initial content doesn't really support localizing child sites different from parent sites. It does support some localization because labels come from resource files and some content can come from /Data/MessageTemplates. If at the time of creating a new site the browser language preference is set to a language for which there exists those resources for then it will localize the new site content based on that. But this was mainly designed to localize the first site so if an Italian user installs mojoPortal they get initial content in Italian, etc. as long as Italian is their language preference in browser settings. Once sites are created they can be forced to a specific culture as discussed on the bottom of this page: http://www.mojoportal.com/localization.aspx

Hope it helps,

Joe

 

11/19/2010 5:04:46 AM
Gravatar
Total Posts 3

Re: Multiple sites and their initial content

Joe,

Thank you for your answer.

Considering what you've said, would scripting of database content help me(what tables have to be scripted)? I'll provide my custom database installer(or add scripted files to features setup install script folder). Next after visiting setup page of mojoportal, I'll create new site in administration panel.

The possible issue would be forcing this newly created site to grab correct content from the database.

I guess I'll have to set following in my .config file as well:

<add key="UseCultureOverride" value="true" />

<add key="site1culture" value="en-US" />
<add key="site2culture" value="nl-NL" />

 

11/19/2010 7:33:25 AM
Gravatar
Total Posts 18439

Re: Multiple sites and their initial content

Sorry but I have no good advice for you on this. We don't create new or initial sites from database installation scripts, database scripts only create the tables and stored procs, then .NET code creates the initial site and calls the relevant data code to do it. There are lots of steps, it creates a site, roles, and an admin user in the admins role, creates folders, copies files for skins etc etc.

Those config settings control only existing sites not site creation. On a new installation there is no site until after the setup page runs so setting a specific culture for site1 has no effect during setup. The culture setting may apply if you visit setup page again after the first site is created because then it has a site context for site 1 before the page runs. These culture settings force the executing thread to execute in the context of the specified culture, but the setup page is not going to change the thread culture in the middle of execution after creating a site so it will not work.

Only ideas I can think of is find a way to ship a pre-populated database with your package. It could be done easily with SQL CE, though that may not be robust enough for your app needs.

Best,

Joe

 

You must sign in to post in the forums. This thread is closed to new posts.