Sha256: c88cf74d4af98f3466d9ade1622963f1cdcbd7a4d45935c20a6dd354f5574be5

Contents?: true

Size: 958 Bytes

Versions: 30

Compression:

Stored size: 958 Bytes

Contents

class ArchiveMonthIndexPage < Page
  
  description %{
    To create a month index for an archive, create a child page for the
    archive and assign the "Archive Month Index" page type to it.
    
    A month 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 month which the index page is rendering.
      
      *Usage*:
       <pre><code><r:archive:children>...</r:archive:children></code></pre>
  }
  tag "archive:children" do |tag|
    year, month = $1, $2 if request_uri =~ %r{/(\d{4})/(\d{2})/?$}
    tag.locals.children = ArchiveFinder.month_finder(parent.children, year, month)
    tag.expand
  end
  
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.2.2 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.2.1 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.2 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.9 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.8 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.7 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.6 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.5 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiantcms-couchrest_model-0.1.4 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.7.2 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.9.1 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.8.2 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.9.0.rc2 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-rc-0.9.0 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.8.1 vendor/extensions/archive/app/models/archive_month_index_page.rb
radiant-0.6.0 app/models/archive_month_index_page.rb
radiant-0.6.1 app/models/archive_month_index_page.rb
radiant-0.6.2 app/models/archive_month_index_page.rb
radiant-0.6.3 app/models/archive_month_index_page.rb