Hi *,

I came across a smal bug in the radiant-tags-extension. What is the recommended way to provide the bug fix? Always directly contact the author? Its in the tag_list tag when using the complex mode. the string should be splited with MetaTag::DELIMITER and not with " ".


And i added a new tag tag_cloud_list which can be used to show all used tags (:limit => 100) in the sitebar. have a look at

http://edmund.haselwanter.com/en/blog to see it in action

the git diff:

diff --git a/app/models/radius_tags.rb b/app/models/radius_tags.rb
index 953bd48..5a25493 100644
--- a/app/models/radius_tags.rb
+++ b/app/models/radius_tags.rb
@@ -50,11 +50,25 @@ module RadiusTags
     end
     output += "</ol>"
   end
-
+
+  desc "Render a Tag list"
+  tag "tag_cloud_list" do |tag|
+    tag_cloud = MetaTag.cloud({:limit => 100}).sort
+    output = "<ul class=\"tag_cloud\">"
+    if tag_cloud.length > 0
+ build_tag_cloud(tag_cloud, %w(size1 size2 size3 size4 size5 size6 size7 size8 size9)) do |tag, cloud_class, amount| + output += "<li class=\"#{cloud_class}\"><a href= \"#{tag_item_url(tag)}\" class=\"tag\">#{tag}(#{amount})</a></li>"
+        end
+    else
+        return "<p>No tags found.</p>"
+    end
+    output += "</ul>"
+  end
+
   desc "List the current page's tags"
   tag "tag_list" do |tag|
     output = []
- tag.locals.page.tag_list.split(" ").each {|t| output << "<a href= \"#{tag_item_url(t)}\" class=\"tag\">#{t}</a>"} + tag.locals.page.tag_list.split(MetaTag::DELIMITER).each {|t| output << "<a href=\"#{tag_item_url(t)}\" class=\"tag\">#{t}</a>"}
     output.join ", "
   end

@@ -172,4 +186,4 @@ module RadiusTags
     options
   end

-end
\ No newline at end of file
+end

cu edi
--
DI Edmund Haselwanter, [EMAIL PROTECTED], http://edmund.haselwanter.com/



_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to