Yahoo Grids Helpr plugin

Plugin details

Yahoo Grids Helper is a Ruby on Rails library for automatically working with the Yahoo Grids CSS framework.

Websitehttp://wonderfullyflawed.com/goodies/ Repositoryhttp://wonderfullyflawed.com/svn/grids_helper/ Author Trek Glowacki Tags yahoo, grid LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://wonderfullyflawed.com/svn/grids_helper/

Usage
==========
yahoo_grids_from_collection is a method that will turn a collection of objects into a grid layout. This will work only inside the main block of your Yahoo Grids layout.

yahoo_grids_from_collection has one required argument, three optional arguments, and a also takes a block with iterator.

yahoo_grids_from_collection @collection, grid, g_html_opts, u_html_opts, &block



  @collection # a collection of Rails objects e.g. the results of Products.find(:all)
  grid        # default: "" (empty string) the style of grid you would like to use.  Valid options are "", "a", "b", "c", "d", "e", "f" yahoo_grids_from_collection does not yet create nested yui-g's
  g_html_opts # default: {} (empty hash) the html attributes of the grid  element
  u_html_opts # default: {} (empty hash) the html attributes of the unit  element



Example:

<% yahoo_grids_from_collection @products do |p| %>
  < h1><%= p.title %>< /h1>
<% end -%>

<% yahoo_grids_from_collection @products, "c", {:id => 'outer_area'}, {} do |p| %>
  <%= p.title %>
<% end %>


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (3 older versions) | Last edited by: hardway, 11 months ago