radiant-find_by_id_tag-extension 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,9 +46,31 @@ module FindById::TagExtensions
46
46
  tag.expand
47
47
  end
48
48
 
49
+ desc %{
50
+ Sets the scope to the individual aggregated page allowing you to
51
+ iterate through each of the listed paths.
52
+
53
+ *Usage*:
54
+
55
+ <pre><code><r:aggregate:each paths="/section1; /section2; /section3"> ... </r:aggregate:each></code></pre>
56
+ }
57
+ tag "aggregate:each" do |tag|
58
+ aggregates = []
59
+ # tag.locals.aggregated_pages = tag.locals.parent_ids.map {|p| Page.find(p)}
60
+ # Make this tag accept 'order' params. Ideally this would go in Radiant's standard_tags.rb
61
+ order = children_find_options(tag).delete(:order)
62
+ tag.locals.aggregated_pages = Page.find(tag.locals.parent_ids, :order => order)
63
+
64
+ tag.locals.aggregated_pages.each do |aggregate_page|
65
+ tag.locals.page = aggregate_page
66
+ aggregates << tag.expand
67
+ end
68
+ aggregates.flatten.join('')
69
+ end
70
+
49
71
  desc "Renders the id of the current page"
50
72
  tag "id" do |tag|
51
73
  tag.locals.page.id
52
74
  end
53
75
 
54
- end
76
+ end
@@ -1,5 +1,5 @@
1
1
  module RadiantFindByIdTagExtension
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  SUMMARY = "Find By Id Tag for Radiant CMS"
4
4
  DESCRIPTION = "Adds support for an 'id' attribute to r:find"
5
5
  URL = "http://github.com/jomz/radiant-find_by_id_tag-extension"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-find_by_id_tag-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-13 00:00:00.000000000 Z
12
+ date: 2018-05-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Adds support for an 'id' attribute to r:find
15
15
  email:
@@ -18,20 +18,21 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
- - app/views/admin/pages/_id_column_td.html.haml
22
- - app/views/admin/pages/_id_column_th.html.haml
23
- - app/views/admin/pages/_id_field.html.haml
21
+ - radiant-find_by_id_tag-extension-1.0.0.gem
24
22
  - cucumber.yml
25
23
  - find_by_id_tag_extension.rb
24
+ - radiant-find_by_id_tag-extension-1.2.0.gem
25
+ - README.md
26
+ - Rakefile
27
+ - radiant-find_by_id_tag-extension.gemspec
26
28
  - lib/find_by_id/tag_extensions.rb
27
- - lib/radiant-find_by_id_tag-extension.rb
28
29
  - lib/tasks/find_by_id_tag_extension_tasks.rake
29
- - radiant-find_by_id_tag-extension-1.0.0.gem
30
+ - lib/radiant-find_by_id_tag-extension.rb
30
31
  - radiant-find_by_id_tag-extension-1.1.0.gem
31
- - radiant-find_by_id_tag-extension-1.2.0.gem
32
- - radiant-find_by_id_tag-extension.gemspec
33
- - Rakefile
34
- - README.md
32
+ - app/views/admin/pages/_id_column_td.html.haml
33
+ - app/views/admin/pages/_id_field.html.haml
34
+ - app/views/admin/pages/_id_column_th.html.haml
35
+ - radiant-find_by_id_tag-extension-1.2.1.gem
35
36
  homepage: http://github.com/jomz/radiant-find_by_id_tag-extension
36
37
  licenses: []
37
38
  post_install_message:
@@ -57,4 +58,3 @@ signing_key:
57
58
  specification_version: 3
58
59
  summary: Find By Id Tag for Radiant CMS
59
60
  test_files: []
60
- has_rdoc: