- var idx = 0
each obj in links
  li
    a.g-breadcrumb-link(g-index="#{idx}")
      if (obj.resourceName == 'user')
        i.icon-user
        | &nbsp;
      else if(obj.resourceName == 'collection')
        i.icon-sitemap
        | &nbsp;
      | #{obj.get('name') || obj.name()}
  - idx += 1

if current
  li.active
    if (current.resourceName == 'user')
      i.icon-user
      | &nbsp;
    else if(current.resourceName == 'collection')
      i.icon-sitemap
      | &nbsp;
    | #{current.get('name') || current.name()}

if (idx > 0)
  .pull-right
    a.g-hierarchy-level-up(title="Go up one level")
      i.icon-level-up
