Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Language route/url settings
Pickels
#1 Posted : Tuesday, September 22, 2009 11:39:00 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 9/8/2009(UTC)
Posts: 91
Location: Belgium
Hello,
my website has 3 applications: mydomainNl, myDomainEng and myDomainFr. So one application for each language. Now I was wondering if it was possible to set the domain/url to:

http://www.myDomain.com/nl/
http://www.myDomain.com/eng/
http://www.myDomain.com/fr/

I know that in application properties you can set the domain to http://www.mydomain.com and then call the application with "/c-myDomainEng" but it would be fancy to have "/eng".

Thanks in advance

Pickels
jifeng
#2 Posted : Wednesday, September 23, 2009 9:03:47 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
HI Pickels:
According to our idea, we advice use sub-domain for each language. Such as:
http://nl.mydomain.com/
http://en.mydomain.com/
http://fr.mydomain.com/
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
ldicocco
#3 Posted : Wednesday, September 23, 2009 10:40:55 AM(UTC)
Rank: Newbie
Groups: Registered

Joined: 9/14/2009(UTC)
Posts: 3
Location: Livorno (Italy)
Unfortunately it's not always possible to use subdomains.
While I'd prefer if in version 1.2 there would be a cleaner way, I've been able to achieve the same result by inserting in routes.config, BEFORE the penultimate route, the one named "Common", a route like this one:
<add name="CommonIT" url="it/{pageName}/{*contentUrl}">
<defaults controller = "Common" action = "Execute" pageName="" application="myDomainIT" ></defaults>
<dataTokens Namespaces="Everest.CmsServices.Controllers"/>
</add>
Apparently it seems to work, but I'm not sure there are some collateral problem.

Luciano Di Cocco
jifeng
#5 Posted : Wednesday, September 23, 2009 1:47:58 PM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
hi ldicocco:

Yes, it is ok. But please put it before "CommonInDNSHost".
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Pickels
#4 Posted : Wednesday, September 23, 2009 9:00:03 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 9/8/2009(UTC)
Posts: 91
Location: Belgium
ldicocco wrote:
Unfortunately it's not always possible to use subdomains.
While I'd prefer if in version 1.2 there would be a cleaner way, I've been able to achieve the same result by inserting in routes.config, BEFORE the penultimate route, the one named "Common", a route like this one:
<add name="CommonIT" url="it/{pageName}/{*contentUrl}">
<defaults controller = "Common" action = "Execute" pageName="" application="myDomainIT" ></defaults>
<dataTokens Namespaces="Everest.CmsServices.Controllers"/>
</add>
Apparently it seems to work, but I'm not sure there are some collateral problem.

Luciano Di Cocco



I solved it this way but the internal links still use the c-{application}. Is there a way to fix that?

http://glasvandoren.sneak-peek.be/eng/

That's the website I am working on and as you can see the links on the page all use the c-{app} routes.
zguoqi
#6 Posted : Wednesday, September 23, 2009 11:16:48 PM(UTC)
Rank: Administration
Groups: Registered, Administrators

Joined: 9/2/2009(UTC)
Posts: 692
Location: xiamen
Pickels,

We use the c-{app} to make sure that we match to the right application. If you only do site.com/eng, it is hard for system to map to the right route. "eng" can be an application or a pagename.

I am thinking of one alternative, you can change the c-{app} into anything you like. for example, you can make it like site.com/app-en, site.com/app-nl. Is this looks better and more acceptable than the c-{app}. You only need to change the routes.config file and at the JavaScript file, "Urls.js", line 27
>> previewPage: 'c-{0}/{1}',

This may not be perfect, but maybe more acceptable for you?

If you want to modify the source code for url generation, you can find the method at Everest.CmsServices.MvcHelper.GeneratePageUrl. However we recommend not to modify source code to make future upgrade easier.

This is the only alternative I can think of now. Maybe Jifeng got a better idea.
Regards,

Vincent

Kooboo Team
Pickels
#7 Posted : Thursday, September 24, 2009 12:53:46 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 9/8/2009(UTC)
Posts: 91
Location: Belgium
I was thinking of something along those lines the problem is that I gave really stupid names to my applications. If they were just nl, fr and eng I wouldn't even mind the c-{app} that much. I am not sure if you can change the application names. I noticed you can't do it from the admin panel so I guess it's not that easy to change the name.
jifeng
#8 Posted : Thursday, September 24, 2009 9:20:01 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
Hi Pickels:

I have seem your site, it looks good, good implementation of Kooboo, we will try to see whether we can gather some improvement for you.

To change the application name, you have to do it manually, following below steps.

1. open table "aspnet_Applications", change the fields of ApplicationName, LoweredApplicationName, BaseApplication and Theme.

2. open table "Cms_Folder", in the "FolderPath" column, you may see some values contains the old application name, change them to new application name.

3. Go to Kooboo root on the hard disk, go to "Template" folder, you may see old application name used as a folder name, change that folder name into new application name.

4. Replace all the binary resource path in your templates if you used them.

Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
zguoqi
#9 Posted : Thursday, September 24, 2009 3:17:20 PM(UTC)
Rank: Administration
Groups: Registered, Administrators

Joined: 9/2/2009(UTC)
Posts: 692
Location: xiamen
Pickels,

I just discussed with Jifeng, if you just remove the "c-" on the routers.config and also remove it from the preview URL at "Urls.js", it seems like will work out. The only thing to remember is that in this case, the domain you used to access the CMS and those front sites can NOT be assigned to any application any more.

Also after checking your site, we though we will give some advice on your site.

1. JavaScript files.
I see you use some JavaScript files. In our practice, we recommend to combine and compress JavaScript and CSS files before sending them to client side. For CSS, we use the theme folder. In the "BinaryResource" folder, you should find a folder name "JavaScript" as well, that is the folder we recommend to put your JavaScript files. JavaScripts in this folder will be combined and compressed, then write to client side.

In order to use the combine and compress function, be sure to check the "released version" checkbox on root system setting. Kooboo can be run on debug mode or released mode.

The JavaScript reference to google site is a good practice.

2. Image gallery
I have seen your image gallery now. It use the binary resource which is fine. Binaryresource is just like disk storage. Maybe you need to generate a thumbnail on the fly. Generating a thumbnail is very easy in .NET.

But I would also like to remind you of three other possibilities.

-- file controltype in Text Schema. When defining a schema, you can define a field with the controltype of File, then you can upload and access the fileurl just like a normal text fields. This is the best option when you can have a fixed amount of pre-definded file fields.

-- Binary schema, one text schema can contains one or more binary schema. This is more like creating a relation from text content to binary content. Binary content is linked to Text content but not a subcontent of the text content.

-- File included. When this is checked, one text content will have a upload box to upload unlimited amount of files. This can be used when amount of file attachment is not determine.

In some implementation, I have seen people using two file controltypes, one for thumbnail, one for bigger image. Depends on your situation, you can decide what is the best for you.

Regards,

Vincent
Regards,

Vincent

Kooboo Team
Pickels
#10 Posted : Friday, September 25, 2009 8:53:27 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 9/8/2009(UTC)
Posts: 91
Location: Belgium
Hey guys,
sorry for the slow reply but I was busy for a few days. First of all a big thanks for reviewing my site.

The reason I put the javascript files in a different folder is because it didn't work for applications inheriting from that application. So in my project the dutch app is the main app and english and french are based on that. But in the english and french version the link to the compressed js file isn't included. I am not sure if this is normal behavior or a bug. I was going to post it in the bug forum but I didn't have a lot of time and I kinda forgot about it.

Here are the headers of the dutch app(main) and the english one (child).

Dutch
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<link rel="shortcut icon" href="http://glasvandoren.sneak-peek.be/favicon.ico" type="image/x-icon" />
<link href="/Script/GetTheme?Theme=Glasvandoren.Default" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="/Script/GetJavascript?application=Glasvandoren"></script>

English
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<link rel="shortcut icon" href="http://glasvandoren.sneak-peek.be/favicon.ico" type="image/x-icon" />
<link href="/Script/GetTheme?Theme=Glasvandoren.Default" rel="stylesheet" type="text/css" media="all" /></head>

As you can see the english one is missing the link to the compressed js file. This is also true for the french version.

About the image gallery you are right about making thumbnails. It's on the todo list but didn't have a lot of time to add it yet.

Thanks for explaining the other 3 possibilities for handeling files. The controltype file I used on the website and it works great. The relation from text and binary and the file include look really usefull I am gonna use it for my new project.


jifeng
#11 Posted : Saturday, September 26, 2009 2:35:10 PM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
Hi Pickels:
Quote:
The reason I put the javascript files in a different folder is because it didn't work for applications inheriting from that application. So in my project the dutch app is the main app and english and french are based on that. But in the english and french version the link to the compressed js file isn't included. I am not sure if this is normal behavior or a bug. I was going to post it in the bug forum but I didn't have a lot of time and I kinda forgot about it.


We have improved the site script inclusion function. In the feature version, just the same as Theme, you can select which site's javascript will be included from its inherited. I think it will be useable.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.534 seconds.