{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/router/issues/71","labels_url":"https://api.github.com/repos/aurelia/router/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/router/issues/71/comments","events_url":"https://api.github.com/repos/aurelia/router/issues/71/events","html_url":"https://github.com/aurelia/router/issues/71","id":69502873,"number":71,"title":"generating a sitemap with the router","user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-20T04:19:50Z","updated_at":"2015-04-22T10:46:00Z","closed_at":"2015-04-22T05:42:25Z","body":"Hey,\r\nI'm trying to create a sidebar with routes grouped under categories and couldn't find an immediate way to do so. The sidebar would look like:\r\n\r\n```\r\nSome Heading\r\n   <route to page 1>\r\n   <route to page 2>\r\n\r\nSome Other Heading\r\n   <route to page 3>\r\n   <route to page 4>\r\n```\r\n\r\nWhen I asked this on gitter someone mentioned using nested routers, but it seems as if router.childRecognizer isn't populated until the actual route is activated. There seems to be two logical ways to represent this:\r\n\r\n   * nested routers\r\n   * a route config that takes a hierarchical object definition\r\n\r\nPersonally, I prefer the nested router approach, since I could easy move the definitions of my routes to sub folders where the logic for those specific \"modules\" exist. In either scenario it would be fantastics to be able to write e.g.\r\n\r\n```\r\n<div repeat.for=\"heading of router.navigation\">\r\n   ${heading}\r\n   <li repeat.for=\"item of router.navigation[heading]\">${item.label}</li>\r\n</div>\r\n```\r\n\r\nOr something along those lines. Is something like this possible today?"},"comment":{"url":"https://api.github.com/repos/aurelia/router/issues/comments/95131828","html_url":"https://github.com/aurelia/router/issues/71#issuecomment-95131828","issue_url":"https://api.github.com/repos/aurelia/router/issues/71","id":95131828,"user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T10:46:00Z","updated_at":"2015-04-22T10:46:00Z","body":"@EisenbergEffect sure give me a couple hours. In the meantime, while this solution works for my needs today I still think it's worth discussing alternatives to this approach. I see a couple potential alternatives off the top of my head:\r\n\r\n  * ```nav: true``` is already specified to include a route in some sort of navigation building logic, shouldn't it be able to build hierarchical models?\r\n\r\n  * The real dream would be for me to specify child routers in each of my sub pages/modules. So \"Some Heading\" in the example given above would be in a folder called \"some-heading\", and \"some-heading.js\" within would contain a router indicating routes to \"page1\", \"page1\", etc.  In turn the top level app.js would be able to iterate through all those child routers to provide the \"site map\". TBH I haven't read through enough of your routing code to see why this isn't possible, but I gather that it's because you lazily load these child routers?\r\n\r\nThe problem I'm currently having is now associating an icon with each category. With the current approach it seems that I would have to modify my categories to look like: \r\n```javascript\r\n   settings: { category: { name: \"some heading\", icon: \"some-icon\" } }\r\n```\r\nWhich means I'd have to duplicate that data each time I assign a route to a category.\r\n\r\nThoughts?"}}