_plugins/macro-index/macro-index.rb
# Produce an HTML list of child pages.
# @param options [Hash]
# @option [Page, String] :of            (self) Starting point, either a Page or a path
# @option [Number] :depth               (1)    How deep?
# @option [Array<Page>] :no_recurse     ([self]) Do not recurse into these pages
# @option [Bool] :trailing_slash        (1)    Add trailing slashes after directory names whose contents were not listed
# @option [Bool] :ignore_settings_files (true) Do not list _settings.txt files
# @option [Array, Page, String] :ignore ([])   Do not list these pages.
Produce an HTML list of child pages.
Produce an HTML list of child pages .
def index(options = {})
      options = {
        :of => self,
        :depth => 1,
        :no_recurse => [self],
        :trailing_slash => true,
        :ignore_settings_files => true,
        :ignore => []
      }.merge!(options)
      start = index_get_start_page(options[:of])
      return Rack::Utils.escape_html("index: #{options[:of]} doesn't exist") if start.nil?
      pages = start.children(options.select { |k,v| [:ignore, :ignore_settings_files].include? k }) 
      index_build_html(pages, options)
    end
def index ( options = { } ) options = { :of => self , :depth => 1 , :no_recurse => [ self ] , :trailing_slash => true , :ignore_settings_files => true , :ignore => [ ] } . merge! ( options ) start = index_get_start_page ( options [ :of ] ) return Rack :: Utils . escape_html ( "index: #{options[:of]} doesn't exist" ) if start . nil? pages = start . children ( options . select { | k , v | [ :ignore , :ignore_settings_files ] . include? k } ) index_build_html ( pages , options ) end
Produce an HTML list of child pages.
Produce an HTML list of child pages .
options
<not_specific>
<not_specific>
None
<not_specific>
:ignore ([]) Do not list these pages.
: ignore ( [] ) Do not list these pages .