Sha256: 08e37eb0fcb57272c1e1374a259d094fef63029231a5b7dae539bbe96f197df9

Contents?: true

Size: 898 Bytes

Versions: 13

Compression:

Stored size: 898 Bytes

Contents

- commence = (defined?(start) && start) || current_page
- pages = commence.legitimate_children
- if defined?(recurse) && recurse
  - unless pages.to_a.empty?
    %ul
      - pages.each do |p|
        %li<
          = link_to p.data.title, p
          = partial 'partials/toc_index', :locals => { :start => p, :recurse => true }
- else
  %ul{:class => (defined?(klass) && klass) || nav_toc_index_class}
    %li<
      = link_to commence.data.title, commence
      = partial 'partials/toc_index', :locals => { :start => commence, :recurse => true }

-#
  - This partial renders nested links into an <ul>. The top level item is the
    start page followed by the entire directory structure below it.
  - You probably need a class in order to render this properly.
  - :start - pass in this local to specify the starting page.
  - :klass - pass in this local to specify a class for the containing div.

Version data entries

13 entries across 12 versions & 2 rubygems

Version Path
middleman-pagegroups-1.0.10 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.9 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.8 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.7 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.6 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.5 documentation_project/source/partials/_nav_toc_index.haml
middlemac-2.0.0 fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml
middlemac-2.0.0 documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.4 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.3 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.2 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.1 documentation_project/source/partials/_nav_toc_index.haml
middleman-pagegroups-1.0.0 documentation_project/source/partials/_nav_toc_index.haml