Howdy! I am adding some custom routes to a plugin for a site that will maintain the exhibit pages hierarchy in the URL when viewing an item.
Instead of adding three routes to account for the heirarchy, I’d like to do this with one route if possible, so that these three urls would use the same controller and action:
exhibits/show/:page_slug_1/:page_slug_2/:page_slug_3/items/:item_id exhibits/show/:page_slug_1/:page_slug_2/items/:item_id exhibits/show/:page_slug_1/items/:item_id
From what I’ve found in the Zend docs, it looks like this should be possible with a regex style string for those three page segments, but I’m not having any luck getting it to work. When I break them out into three separate route definitions, it works; but I’d rather not do that if there’s a more efficient way.