Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancy URL: http://domain/cat1/cat2/page
#1
Hi!

At the moment I'm developing a website for a client using GetSimple. I really got to love the system, but didn't like not having my second category depth displayed in the URL structure... I searched the forum and didn't find a solution... therefore I tried hacking it myself and it seems, I was successful!! Smile

I18N Base is necessary for the hack to work, because the hack is written in i18n_base/frontend.class.php

Look for the function public static function getURL($slug, $slugparent, $language=null, $type='full') and add the following code after global $url, $parent, $PERMALINK, $PERMALINK_ORIG;

PHP Code:
    $data self::getPageData($slugparent);
    if(
$data) {
        
$parentparent $data->parent;
        if(
$parentparent != "") {
            
$slugparent $parentparent."/".$slugparent;
        }
    } 

At least for me it worked and now I do not have
http://domain.com/cat1/cat2/ followed by http://domain.com/cat2/page
but http://domain.com/cat1/cat2/page

Therefore I hope, this small hack can be of help for others as well Smile

Best,
Anke
Reply


Messages In This Thread
Fancy URL: http://domain/cat1/cat2/page - by Kida - 2013-04-27, 23:52:38



Users browsing this thread: 1 Guest(s)