Skip to:

Re: Router for root components

Ok guys I’ve put it up on SVN on Beanstalk. There’s the router here: and there’s a minimal root component to get you going here:

The router assumes that the root component is registered via the action bp_setup_globals since it uses the global data to figure out what to route to. The root component works out of the box even though it doesn’t actually do anything, it just sets up all the globals and slug. In this case I’ve put in a screen function for the index action. If you don’t actually need to do any business logic I would recommend removing it and adding a folder in your theme corresponding to the component id (in this case bp_min_root) and putting an index.php file in there instead.

Let me know if it works for you and what you think. I’d love to discuss what conventions to use for this kind of thing.

Skip to toolbar