Added some routing functionality to the template context