I have 2 different content scenarios:
-
show a post with a dynamic url for instance:
http://xyz.com/my-post-title-here
http://xyz.com/2012/04/15/whatever
.. and so on basically it can be anything -
Show a predefined page for instance
http://xyz.com/contact
which could also be:
http://xyz.com/contact/contact-form <– anything after /contact is an action to perform on the page.
My router conf looks like this,
{
"" : "pageRoute" // homepage
"*post" : "postRoute" //<--catchall for dynamic urls
"about*action" : "pageRoute" // these
"contact*action" : "pageRoute" // are
"gallery*action" : "pageRoute" // all
"home*action" : "pageRoute" // predefined
}
PROBLEM
Only problem is that ONLY the postRoute method ever seems to get fired?
i’ve also tried:
“contact/:action”
“contact/*action”
but no luck.
I’ve read the documentation but I can’t see my issue.
EDIT:ANSWER make the dynamic postroute the last in the config list thanks to @asawyer below
Make the dynamic route the last one in the list.