Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Tag Cloud

Tag Cloud

= TagCloud Generates a “tag cloud”. Copy the assets/javascripts/tag_cloud.js file to your public/javascripts folder. Load the JavaScript in your layout:

<%= javascript_include_tag 'tag_cloud' %>

This plugin requires the presence of the polymorphic version of acts_as_taggable. Look for it at http://dev.rubyonrails.org/svn/rails/plugins/acts_as_taggable

Usage <%= tag_cloud(:post, :tag_list, :limit => 20, :order => :popularity, :target_class => :post %>

Where:

  • :limit: The maximum number of tags to show. The default is 20.
  • :order: In what order should the tags be shown. Accepts :popularity or :alpha. The default is :popularity.
  • :target_class: Optional. If the object is nil, this value becomes required. This option identifies which class we should query to find the tags to use.
  • :field_id: The field to modify (add/remove tag name).

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all 4 member details


Membership

+ Join this railsplugin

Record Maintainer

'None'