hierarchical URLs
Posted: Tue Oct 11, 2005 6:51 pm
I would like to use urls of the form www.example.com/section/subsection/page/ where 'section' is the parent of 'subsection' which is the parent of 'page' in the CMS content hierarchy (and each are pages in their own right). I would also like any link to the 'default' page to simply link to www.example.com/ (instead of www.example.com/home/ or whatever).
I think I can do this quite easily by editing the source and .htaccess files but I was wondering why there are several versions of the GetURL() function that seem to be doing exactly the same thing - notably in lib/page.functions.php and lib/contenttypes/Content.inc.php. Wouldn't it make more sense to have a single function to generate all URLs or maybe an overridable class method on each content type?
Of course configurable custom URL generation would rock my pants off but I understand that's a bit more tricky.
The other note is that in the scheme outlined above every page and section would need to have a globally unique alias. It would be nice to be able to use the parent section alias(es) as part of each page alias in order to allow locally unique aliases. E.g. www.example.com/dept1/contact/ and www.example.com/dept2/contact/
I think I can do this quite easily by editing the source and .htaccess files but I was wondering why there are several versions of the GetURL() function that seem to be doing exactly the same thing - notably in lib/page.functions.php and lib/contenttypes/Content.inc.php. Wouldn't it make more sense to have a single function to generate all URLs or maybe an overridable class method on each content type?
Of course configurable custom URL generation would rock my pants off but I understand that's a bit more tricky.
The other note is that in the scheme outlined above every page and section would need to have a globally unique alias. It would be nice to be able to use the parent section alias(es) as part of each page alias in order to allow locally unique aliases. E.g. www.example.com/dept1/contact/ and www.example.com/dept2/contact/