I think that I need to set up a few routes to handle my category based RSS feeds. I have a current url structure as follows

http://something.com/shows/wmr/marketing pr


I need rss feeds from both the parent and child categories


The rss template i am using is stored in


I have munged something together in the cp routes settings but I would prefer to have this in routes.php. Having access to the parentCategory and childCategory values without doing a segments thing would be nice.


1 Answer 1


Okay, I think that I have figured it out. Posting here for posterity. Based on the requirement above, I put these in my routes.php file.

'shows\/(?P<parentSlug>[a-zA-Z0-9\-\.]+)\/(?P<childSlug>[a-zA-Z0-9\-\.]+)\/feed' => 'categories/_shows.rss',


'shows\/(?P<parentSlug>[a-zA-Z0-9\-\.]+)\/feed' => 'categories/_shows.rss',

This gives me two variables. parentSlug and childSlug

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.