Ticket #630 (new enhancement)

Opened 4 months ago

Adding offset and limit options to page attachment each tag

Reported by: adamski Assigned to:
Priority: minor Milestone:
Component: extensions Keywords: page attachment attachments each offset limit
Cc:

Description

Simple change - to add limit and offset options to page attachment 'each'

last tag block reads:

  tag "attachment:each" do |tag|
    page = tag.locals.page
  	order = tag.attr["order"] || "asc"
    by = tag.attr["by"] || "id"
    limit = tag.attr["limit"] || 50
    offset = tag.attr["offset"] || 0
    returning String.new do |output|
      page.attachments.find(:all, :limit => limit, :offset => offset, :order => [by, order].join(" ")).each do |att|
        tag.locals.attachment = att
        output << tag.expand
      end
    end
  end  

Updated page_attachment.rb attached.

Attachments

page_attachment_tags.rb (6.2 kB) - added by adamski on 03/11/08 11:04:40.
page_attachment_tags.rb

Change History

03/11/08 11:04:40 changed by adamski

  • attachment page_attachment_tags.rb added.

page_attachment_tags.rb