rsanchez / resource_router

Resource Router for ExpressionEngine
MIT License
48 stars 12 forks source link

Fix structure URL handling #17

Closed bryanburgers closed 10 years ago

bryanburgers commented 10 years ago

Allow ':page:3' to work using Structure in certain situations. Previously, the regex generated for something like

:page:3/:any/:pagination

would look like

#^(news/)/([^/]+)((?:/P\d+)?)$#

and would never match because there are two slashes in a row. For whatever reason, $this->pageUris has trailing slashes on all of the items, so those trailing slashes need to be removed when creating the rule.

rsanchez commented 10 years ago

Makes sense, thanks!