2009年9月25日星期五

[fw-mvc] how to use a 'recursive' route

Hi,

I've searched the whole internet about this issue, but without success, so I'm trying it here now ;-) Imagine I have a site where a user can recursively add subpages. Ofcourse the user isn't able to add routes, so I bet I should add a 'recursive' route. This should be something like: /page* where * = /userinput1/userinput2/userinput3 I assume. Then I think I have to handle this path myself. However, I am unable to get this whole path. Does anyone have a best practice for this? If I use page(/\w+)+ in a regex route I am only able to retrieve the last part (/userinput3) without the preceding path. Anyone?

Kind regards,

Dimitri

没有评论: