secondaryPath = public.docs[current.path[1]][current.path[2]][current.path[3]]

if secondaryPath
  data = secondaryPath._data
  listType = data._listtype
  ordered = listType == "ordered" ? "is-ordered" : ""
  items = listType == 'api' ? secondaryPath : data
  number = 1


  //SECONDARY NAVIGATION
  ul(class="side-nav-secondary #{ordered}")

    for page, slug in items

      // DEFAULT LIST VALUES
      selected =  current.path[4] == slug ? 'is-selected':''
      name = page.title;
      path = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + slug + ".html"


      if slug != "_listtype" && slug != 'index' && slug != '_contents' && slug != '_data'
        // API LIST VALUES
        if listType == 'api'
          name = public.docs[current.path[1]][current.path[2]][current.path[3]][slug]._data["index"]["title"]
          path = "/docs/" + current.path[1] + "/" + current.path[2] + "/" + current.path[3] + "/" + slug

        // ORDERED LIST VALUES
        if listType == 'ordered'
          num = number++
          name = (listType == "ordered") ?  num + '. ' + page.title : page.title;


        li(class="#{selected}") <a href="#{path}" md-button>#{name}</a>



      // TERTIARY NAVIGATION
      if selected
        != partial("_tertiary")