Web hiearchy and URLs - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Web hiearchy and URLs (/showthread.php?tid=3829) |
Web hiearchy and URLs - Razz - 2012-11-08 Let's say my page structure is set up like this: - category -> subcategory -> product The url should be: - www.ex.com/category/subcategory/product however, when I go to the product page, the url is just like this - www.ex.com/subcategory/product What can I do to match the URLs with my web hiearchy completely? Thank you RE: Web hierarchy and URLs - Carlos - 2012-11-09 GetSimple generates URLs with a maximum of two levels. It would be nice it could have more, I'll submit an issue to the svn. Meanwhile, if you're interested, I can post here a quick patch I've made (requires editing two core files), that makes GS support three levels in URLs. RE: Web hierarchy and URLs - Razz - 2012-11-09 (2012-11-09, 07:04:42)Carlos Wrote: GetSimple generates URLs with a maximum of two levels. It would be nice it could have more, I'll submit an issue to the svn. Thank you for your reply. I would be glad if you could provide the patch. RE: Web hiearchy and URLs - shawn_a - 2012-11-10 Yeah I never understood the limit of 2 levels. Was this a fancy url limitation on the htaccess? RE: Web hiearchy and URLs - Carlos - 2012-11-10 Dirty patch for GS 3.1.2. (Disclaimer: use at your own risk; not officially supported; I don't know if it may have conflicts with some plugin; it will be undone if you upgrade GS) Edit admin/inc/basic.php, around line 400 you'll find: Code: if ($parent != '') { Remove all that and replace by: Code: global $pagesArray; Now edit admin/edit.php, find this (line 131): Code: <div class="edit-nav" > Just after that, and before the if(isset($id)) { line, insert this: Code: getPagesXmlValues(); and around line 166, remove (or comment out) this: Code: getPagesXmlValues(); (So we've just moved up that sentence.) This is just to fix the "View" button when you edit a page. PS This is a temporary workaround. Now I'm thinking about other ways to do it. (2012-11-10, 00:38:12)shawn_a Wrote: Yeah I never understood the limit of 2 levels. Was this a fancy url limitation on the htaccess? No, GS's .htaccess works ok with any number of levels. It's the way links are generated (find_url). As GS doesn't store the site structure anywhere, you have to obtain the parent somewhere (I did it with global $pagesArray, but I don't like searching the array so many times...) RE: Web hiearchy and URLs - Razz - 2012-11-11 Thanks a lot Carlos. Is it possible to create a plugin out of this in the future? RE: Web hiearchy and URLs - Carlos - 2012-11-11 I hope GS supports multilevel urls in some future version. Until then, I'll think about some other way to do this with a plugin. But almost for sure it will also require some small change to the core, though I'd like it to be easier and more efficient that the quick hack I posted. |