How can I have more than one pathpart in an action at the same time? I tried with Regex and LocalRegex but it realy doesnt work.
This is the result I want:
/typeone/*/*/something
/typetwo/*/*/something
I want to achieve this by using only one base action that captures the two args in from, and can have either the "typeone" or "typetwo" pathpart.
The "something" is just another action that is chained to that base. I don't want to have two bases with two different pathparts, that would require me to have two something chained to each of the bases, right?
Thank you
The common wisdom in the Catalyst community seems to be that chaining is always a better idea than regex matching, these days -- to the extent that some of the regex stuff might get moved out of core in version 6.
Do the examples here help? http://wiki.catalystframework.org/wiki/gettingstarted/howtos/chainedexamples.view
The account/org/*/edit
one seems to involve matching 3 separate PathParts...
Each of the relevant subs -- the ones triggered by typeone and typetwo, in your case -- will be run. Or is that not what you're after?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With