• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Multilingual site and news article custom url
PostPosted: Mon Sep 18, 2017 1:09 pm 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 162
Hi,

i need for a project to have 3 languages, with in each language the same products but of course with a specific url.
So the url must look like :
www.root.com/mypage (must be translated)/mycategory (can be the same in 3 langs)/product-name (can be the same in 3 langs)
So i want 1 article for 1 product (and within 3 langs translations fields), but how to manage a perfect url? Is it possible with news module to modify for example http://www.root.com/news/16/17/product-name.html to http://www.root.com/mypage/mycategory/product-name.html.
Must i use htaccess to modifiy the urls ? Does anybody have one sample that work?

Thanks for any help!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Fri Sep 22, 2017 6:52 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 2972
Location: The Netherlands
I *think* it can be done but it will always involve two steps:

Inside the template displaying the urls you need to change the url according to the language. Perhaps by a (regex) replace using Smarty.

Then, in the .htaccess you need to rewrite those urls back to the original ones which are the only ones recognized by News module (note that you could add query strings to this rewritten urls during this process, so inside the module template you can determine the original language of the url clicked).

I'm not sure if other modules have better multi-language support regarding custom urls.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Fri Sep 22, 2017 1:51 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7936
Location: Fernie British Columbia, Canada
This is not easily possible with the News module.

As @Velden said, you may be able to trick the system by
a: adjusting the URL's in the summary and detail templates to have the appearance of what you want
b: adjusting your .htaccess file to translate the URL back to something that the News module understands and can route to.
but it will always be problematic.

There is certainly nothing built in to CMSMS or the News module to allow you to specify a pattern for the URL like that.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Fri Sep 22, 2017 8:23 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7498
Location: The Netherlands
You can use the pretty url template of the CGBlog module for this.
Each language needs its own category.

So root-url/category/blog-title

_________________
Image
Latest CMSMS article: Search Form Autocomplete

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Tue Sep 26, 2017 7:27 am 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 162
Thanks for your help, i'll test CGBlog ;)


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Mon Oct 16, 2017 4:42 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 26, 2012 3:22 pm
Posts: 235
Location: Belgium
you could check how i solved the same problem https://forum.cmsmadesimple.org/viewtopic.php?f=28&t=71898&p=318079#p318079

the only difference is that i used 2 separate Listit2 modules in this example.

You could go 1 step further and use 1 LISE module.
I did this on http://viaviastellenbosch.travel
The disadvantage in this solution is that you only have 1 "alias" per item so your url will be almost the same for every language.

_________________
Kind regards,
HarmO


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Multilingual site and news article custom url
PostPosted: Tue Oct 17, 2017 12:01 pm 
Offline
Forum Members
Forum Members

Joined: Sat Aug 02, 2008 9:08 pm
Posts: 162
Thanks for the help.
It would be very nice to be able to create custom text filed for each url lang (for Lise and other mods), perhaps someone has achieve this !?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting