Sha256: beb90e2de8ff4f04a849f645eb4aab3625bc1547c00238f59fdac4fbdfd840c6

Contents?: true

Size: 968 Bytes

Versions: 30

Compression:

Stored size: 968 Bytes

Contents

class ArchiveDayIndexPage < Page
  
  description %{
    To create a day index for an archive, create a child page for the
    archive and assign the "Archive Day Index" page type to it.
    
    A day index page makes following tags available to you:
    
    <r:archive:children>...</r:archive:children>
      Grants access to a subset of the children of the archive page
      that match the specific year which the index page is rendering.
  }
  
  include ArchiveIndexTagsAndMethods
  desc %{
      Grants access to a subset of the children of the archive page
      that match the specific day which the index page is rendering.
      
      *Usage*:
       <pre><code><r:archive:children>...</r:archive:children></code></pre>
  }
  tag "archive:children" do |tag|
    year, month, day = $1, $2, $3 if request_uri =~ %r{/(\d{4})/(\d{2})/(\d{2})/?$}
    tag.locals.children = ArchiveFinder.day_finder(parent.children, year, month, day)
    tag.expand
  end
  
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
radiant-0.6.5.1 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.4 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.5 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.7 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.6 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.9 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.6.8 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.7.0 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.8.0 vendor/extensions/archive/app/models/archive_day_index_page.rb
radiant-0.7.1 vendor/extensions/archive/app/models/archive_day_index_page.rb