Saturday 14 August 2004 2:34:04 am
Hi, Can anyone tell me if the setup described below is potentially problematic/stupid? Can this be done in a different (read: easier) way? I'm trying to run two multilingual (dutch, french) sites on a single installation. The setup is as follows: www.site1.com/nl, www.site1.com/fr and www.site2.com/nl, www.site2.com/fr (I don't want to use subdomains). My problem: With this setup is that I have four siteaccesses, with overlapping names (double "nl" siteaccess and "fr" siteaccess). So I renamed my siteaccesses to site1_nl, site1_fr and site2_nl, site2_fr. But since I do not want urls like: www.site1.com/site1_nl or www.site2.com/site2_fr I had to do the following: I modified access.php as follows (line 103):
$name = implode( '_', $elements );
to
$hostname=explode(".",$host);
$name=$hostname[1]."_".implode( '_', $elements );
Which results in the url www.site1.com/fr being translated into site1_fr, the name of the siteaccess then used. The siteaccess name is used to create links, so to avoid all links on the page still being written as www.site1.com/site1_nl I added the following lines to file ezutils/classes/ezsys/ in function addAccessPath (line 696):
$modified_path=explode("_",$path);
$path=$modified_path[1];
which results in the siteaccess in the links on the page changed into "nl" or "fr" again (e.g. www.site1.com/nl/news/demo_news_1). The override/site.ini setup is as follows:
URIMatchType=element
AvailableSiteAccessList[]
AvailableSiteAccessList[]=site1_nl
AvailableSiteAccessList[]=site1_fr
AvailableSiteAccessList[]=site2_nl
AvailableSiteAccessList[]=site2_fr
AvailableSiteAccessList[]=admin
It works but it seems a bit dirty to me.
Thanks for your time, Sebastiaan
Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.
|