Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multilevel folder (URL) structure
#16
Here's a quick 'n dirty patch to the core that may do the trick in this case...

Edit root index.php, around line 30-31 (GetSimple 2.03) insert this:

Code:
$langs=array('fr','de','it','jp');
foreach ($langs as $lg) {
    if (strpos($_SERVER['REQUEST_URI'],'/'.$lg.'/') !== false) {
        $id = $lg.'-'.$id;
        break;
    }
}
(just before the "# define page, spit out 404 if it doesn't exist" line)

Create your pages with slugs like:
sample-page
fr-sample-page
de-sample-page
...

Now you can open (or link to) the e.g. French page with any of these URLs:

domain.com/fr/news/sample-page/ (the one you wanted)
domain.com/news/fr/sample-page/ (another possibility)

...or the "real" ones:
domain.com/news/fr-sample-page/
domain.com/index.php?id=fr-sample-page
Reply


Messages In This Thread
Multilevel folder (URL) structure - by yojoe - 2010-11-16, 17:17:10
Multilevel folder (URL) structure - by yojoe - 2010-11-16, 17:56:37
Multilevel folder (URL) structure - by yojoe - 2010-11-16, 18:37:29
Multilevel folder (URL) structure - by Carlos - 2010-11-17, 07:10:09
Multilevel folder (URL) structure - by Carlos - 2010-11-17, 08:24:49
Multilevel folder (URL) structure - by Carlos - 2010-11-20, 06:09:00
Multilevel folder (URL) structure - by red - 2010-12-12, 02:04:38
Multilevel folder (URL) structure - by Carlos - 2010-12-13, 06:59:45
Multilevel folder (URL) structure - by yojoe - 2010-12-13, 08:58:30



Users browsing this thread: 1 Guest(s)