The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Fancy URL: http://domain/cat1/cat2/page - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11) +--- Thread: Fancy URL: http://domain/cat1/cat2/page (/showthread.php?tid=4690) |
Fancy URL: http://domain/cat1/cat2/page - Kida - 2013-04-27 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!! 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); 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 Best, Anke RE: Fancy URL: http://domain/cat1/cat2/page - bandrzej - 2013-05-03 What version of GetSimple and I18N are you using? Tried this hack and didn't work Had the same issue - slugs will display their parent, but not their grandparents, great grand parents, etc. in the URL to allow proper SEO - very annoying. RE: Fancy URL: http://domain/cat1/cat2/page - Kida - 2013-05-03 I'm using GetSimple 3.2.1 and the newest version of I18N, too... Maybe it works only in combination with I18N Navigation? I use their navigations, maybe that is it? I'm not sure about the great grand parents, as my website only has up to two levels, but I guess then it would be sth like this: PHP Code: $data = self::getPageData($slugparent); RE: Fancy URL: http://domain/cat1/cat2/page - bandrzej - 2013-05-05 Not using the most recent version but also using I18N Navigation - probably part of my issue. To update, I would have to go through another Certification and Accreditation to use to be able to use on my network with Information Assurance approval. That would work from just looking at your code - should be a recursive function to support all levels - some pseduo code - might need globals without looking at getSimpleCode: Code: function getParents($slug) { RE: Fancy URL: http://domain/cat1/cat2/page - mvlcek - 2013-05-06 I18N version 3.2 now supports the placeholder %parents% for "hierarchical" URLs. RE: Fancy URL: http://domain/cat1/cat2/page - bandrzej - 2013-05-06 (2013-05-06, 03:26:42)mvlcek Wrote: I18N version 3.2 now supports the placeholder %parents% for "hierarchical" URLs.Awesome! Glad to hear this. RE: Fancy URL: http://domain/cat1/cat2/page - vitasonline - 2014-01-30 (2013-05-06, 03:26:42)mvlcek Wrote: I18N version 3.2 now supports the placeholder %parents% for "hierarchical" URLs. I tried using it, but I have a problem with sitemap.xml and component Sidebar ( <?php get_i18n_search_results(array('tags'=>'_catalogSidebar', 'i18n'=>0, 'showDate'=>0, 'DATE_FORMAT'=>'%d.%m.%Y', 'numWords'=>'0', 'order'=>'created','showPaging'=>0,'HEADER'=>'')); ?> ). How do all parents in getsimple ? |