Support Center

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Navigation groups

Navigation groups

Last Updated: Nov 21, 2013 08:54PM EST

Navigation links in themes are defined by navigation groups. Every theme uses Koken's primary navigation group for its main navigation. Secondary navigation groups may be added by theme developers to display additional link lists (e.g., a theme's footer, side columns, etc). We'll explain how to create a secondary navigation group in this walkthrough.

Add navigation group

First step is to edit your template(s) to include a secondary navigation group. We do that with the <koken:navigation> tag, like so:

<koken:navigation group="name" />

name is the title of your secondary navigation group. For the sake of this walkthrough we'll call it "footer".

Edit info.json

Edit the theme's info.json file to include a navigation_groups object, like so:

{
  "name": "Theme name",
  "version": "1.0",
  "description": "Theme description",
  "demo": "http://yoursite.com/demo",
  "author": {
    "name": "Your name",
    "link": "http://yoursite.com"
  },

  "navigation_groups": {

  }
}

Add a "footer" object to navigation_groups, like so:

"navigation_groups": {
  "footer": {
  }
}

To control how the group appears in the Site console's sidebar, assign footer a "label" member and value:

"navigation_groups": {
  "footer": {
    "label": "Footer"
  }
}

You may then assign which links should appear in the navigation group by default. You do this by adding a defaults object that's assigned an array of section and profile names. For example, if you wanted to display links to the front and albums page you'd setup defaults like this:

"navigation_groups": {
  "footer": {
    "label": "Footer",
    "defaults": [
      "front", "albums"
    ]
  }
}

Below is a list of all possible link values:

  • front - The assigned front page of the theme (index.lens by default).
  • albums - Index of all public albums (albums.lens).
  • contents - Index of all public images and videos (contents.lens).
  • essays - Index of all published essays (essays.lens).
  • favorites - Content marked as a favorite (favorites.lens).
  • timeline - Stream of all the latest published content (timeline.lens).
  • tags - List of all tags (tags.lens).
  • categories - List of all categories (categories.lens).
  • twitter - Link to the administrator's Twitter profile.
  • facebook - Link to the administrator's Facebook page.
  • gplus - Link to the administrator's Google+ page.

To add a custom link that doesn't link to a pre-defined section, insert the link's label and url by doing this:

"navigation_groups": {
  "footer": {
    "label": "Footer",
    "defaults": [
      "front", "albums", { "label": "Koken", "url": "http://koken.me" }
    ]
  }
}

When the section links appear in Site's left column they will use their value names by default (eg, "albums" will appear as "Albums"). If the publisher has edited their section labels their preferred label will used instead (eg, "Blog" instead of "Essays" if customized that way).

Save info.json

Save your info.json file and load the theme in the Site console. You should see "Footer" in the sidebar and be allowed to add/remove links from it.

Tip: Provide fallback text

If your theme's navigation group doesn't include default links, but you'd like to ask publishers to add them, you can do that by editing the <koken:navigation> tag, like so:

<koken:navigation group="footer" fallbacktext="Add links to here through the Footer navigation group in the Site editor" />

That fallback text will then appear when the template is previewed inside the console (not on the live site). The message is also wrapped with a .k-note class for styling purposes (see more CSS classes here). Our example's output:

<span class="k-note">
  Add links here through the Footer navigation group in the Site editor
</span>
support@koken.me
http://assets3.desk.com/
false
koken
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete