Html4ify plugin

Plugin details

A plugin to help you get rid of the self-closing HTML-tags that Rails' tag helpers keep throwing at you.This is useful when you want to keep your generated HTML-code HTML 4 compliant, hence the name of the plugin.

Repositoryhttp://rails.finalist.com/plugins/html4ify/ Tags HTML, Doctype LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://rails.finalist.com/plugins/html4ify/

=== Usage

Use Rails' tag helpers like you're used to do. This plugin overwrites some standard methods to do its magic, you don't need to worry about a thing. In addition this plugin provides a method +doctype+ to generate a Document Type Declaration. To use it in your views, simply type:

  <%= doctype %>



This will generate a standard HTML 4.01 Strict doctype-declaration. Optionally, you can pass in an argument to specify the type op DTD, like this:

  <%= doctype :loose %>



yields:

  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"



and:

  <%= doctype :frameset %>



yields:

  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: Guest, about 1 year ago