getFinder('posts')->findVisiblePages(); foreach($pages as $page) { $routes[$page->post_name] = '/'. $page->post_name; } return $routes; } // default action public function index(Request $request, Response $response) { // viewing a post if($request['year']) { // viewing all posts } else { $response['posts'] = $this->getFinder('posts')->findAllVisible(1, $this['posts_per_page']); $response['main'] = 'posts.html'; } } // allow for variable route names as per defined in getRoutes from // the database pages that were added, eg: wordpress' "about" page public function __call($fn, array $args = array()) { } }