keystonejs/keystone — pull request #750 by creynders (2014-11-28 13:28:55+00:00)
Title: Allow addition of external links to admin menu

Since the admin section is currently not easily customizable, and I **really** needed to be able to link from the admin menu to something else than a list page I added the possibility to add links to the admin menu from your application specific `keystone.js` file.

E.g.:

```js
//keystone.js

keystone.set( 'nav', {
'content' : [
'posts',
'post-categories',
'enquiries'
],
'reports' : [
{
label: "Comparisons Report",
key : "comparisons-report",
path : "/reporting/comparisons"
}
]
);
```

This will render a "Comparisons Report" in the admin menu under a "reports" section and when clicked upon will point the browser to `/reporting/comparisons`.
Thus, all you need to do in your (application) `/routes/index.js` is add a route binding.

A link entry should always have all 3 props `label`, `key` and `path`. And obviously `path` could contain an external url as well.
These link entries can be mixed with lists, e.g.:

```js
//keystone.js

keystone.set( 'nav', {
'content' : [
'posts',
'post-categories',
'enquiries',
{
label: "Comparisons Report",
key : "comparisons-report",
path : "/reporting/comparisons"
}
]
);
```

If the docs need updating, or anything is wrong or unclear: let me know!