Page 1 of 1

URL hierarchy

Posted: Tue Jul 22, 2008 1:35 pm
by lukas123
Is it possible to have this nice URL hierarchy like this?
I need to change "-number" pages (for example: from /2006/program-1 to /2006/program).

festivatpagesexample.com/2005/info
festivatpagesexample.com/2005/program
festivatpagesexample.com/2005/contact
festivatpagesexample.com/2006/info
festivatpagesexample.com/2006/program
festivatpagesexample.com/2006/contact
festivatpagesexample.com/2007/info
festivatpagesexample.com/2007/program
festivatpagesexample.com/2007/contact

and so on....

Re: URL hierarchy

Posted: Tue Jul 22, 2008 5:22 pm
by Pierre M.
Hello,

anything wrong with the hierarchy option of the pretty URLs ?
http://wiki.cmsmadesimple.org/index.php ... l_Settings

Pierre M.

Re: URL hierarchy

Posted: Tue Jul 22, 2008 6:19 pm
by Dr.CSS
The problem is if you name more than one page the same the alias is automatically give it a number according to how many there are already so his program pages will start getting -1, -2, -3, on the end after the first one and I don't think alias will let him change it and take the change...

Re: URL hierarchy

Posted: Tue Jul 22, 2008 8:26 pm
by lukas123
I know that.
So my question should be - is it possible to have same alias (some hack?) to different pages?
Location of these pages are different, so if I use hierarchy path is different too.

...but pages are selected (example.com/2005/program -> program, example.com/2006/program -> program)  only from the last item in hierarchy URL :-(

I think, it's possible to do some moderewriting (for example: /2005/program to alias 2005-program) , but it's not clean solution and I can't use it in autogenerated menus.

Re: URL hierarchy

Posted: Tue Jul 22, 2008 10:04 pm
by kermit
lukas123 wrote: I know that.
So my question should be - is it possible to have same alias (some hack?) to different pages?
Location of these pages are different, so if I use hierarchy path is different too.

...but pages are selected (example.com/2005/program -> program, example.com/2006/program -> program)  only from the last item in hierarchy URL :-(

I think, it's possible to do some moderewriting (for example: /2005/program to alias 2005-program) , but it's not clean solution and I can't use it in autogenerated menus.
pages are specified solely by their alias... the unrewritten url's of pages are simply ./index.php?page=page-alias

to support duplicate page aliases, i had the idea of using hierarchy instead, e.g. ./index.php?page=parent/page-alias - each page would still have an alias, but would no longer need to be unique. how pages are referred to internally and in URLs would need core changes, and i had submitted a feature request last year with my idea http://forum.cmsmadesimple.org/index.ph ... 011.0.html but it was shot down before it could get off the ground; something about cmsms relying upon unique page aliases.. which, imho, is rubbish, as there's already another unique field available (content_id) for use internally; AND the new 'full alias' (parent/child derived alias) would still be unique as well.

in the interim (perhaps forever and always), you'll need to use a structure similar to:

2006/2006-program
2006/2006-info
2007/2007-program
2007/2007-info

... like you're using now. you could probably add some manually generated rewrite rules to handle shortened request uri's such as 2006/program, and then hack your menu template to strip out those 'redundant' parts of the urls. an ugly, messy fix for something that should've been "fixed" from the very beginning.

Re: URL hierarchy

Posted: Wed Jul 23, 2008 6:50 pm
by Pierre M.
mark wrote: The problem is if you name more than one page the same the alias is ...
Sorry, I hadn't seen the leaves have the same names.
I've seen a post a long time ago (1 year or more) suggesting to have short, webserver-rewriteble aliases :
node1_subnode1_leaf1 rewritten from /node1/subnode1/leaf1.html
node1_subnode1_leaf2 rewritten from /node1/subnode1/leaf2.html
...
node2_subnode1_leaf1 rewritten from /node2/subnode1/leaf1.html
Long unique alias and wanted url hierarchy.
But I'm note sure how intern links (generated by CMSms) (and menus) can stay under this scheme. You may need a rewriting reverse proxy.

Pierre M.