Extends Radiant CMS with tagging capabilities. Tagging as in "2.0" and tagclouds.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 153 commits behind jomz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


= Tags extension

Created by: Benny Degezelle - gorilla-webdesign.be
Version: 0.1.2
Contact: benny AT gorilla-webdesign DOT be

This extension enhances the page model with tagging capabilities, tagging as in "2.0" and tagclouds.

== Requirements

This extension depends on the shards extension and the has_many_polymorphs plugin
Shards should be installed and loaded first; you can change the load order of extensions in config/environment.rb (see http://wiki.radiantcms.org/Using_the_Shards_Extension).

== Installation

1. Copy the extension to your vendor/extensions directory as you would any other extension.
2. From your instance root, run 'rake db:migrate:extensions' to create meta_tags & taggings tables.
3. Then run 'rake radiant:extensions:tags:install'
	Which will copy tags.css to your stylesheets folder. You might want to edit this file.
4. Add the tags.css to your layout;
    <link rel="stylesheet" type="text/css" href="/stylesheets/tags.css" />
5. Make a page to sit in /search/by-tag, and give it the "Tag Search" pagetype.
	If you want to change this location, it's in Radiant::Config['tags.results_page_url'].
	Copy the results page example below, and modify to your likings;

== Results page

  <h2>I couldn't find anything tagged with "<r:search:query/>".</h2>

  <h2>Found the following pages that are tagged with "<em><r:search:query/></em>".</h2>

    <li><r:link/> - <r:author/> - <r:date/></li>

== Tag cloud

Use <r:tag_cloud /> anywhere you like.
I made a stab at building the 'perfect' tag cloud markup, as inspired by a post on 24ways.org;  http://24ways.org/2006/marking-up-a-tag-cloud

== Tag list

Use <r:tag_list /> to get a list of tags for the current page. 
Also works through children:each.

== Collections

You can grab a collection of pages with a certain tag like so;

<r:tagged with="sometag" [scope="/some/page"]>
  <r:link />

Which would iterate over all the resulting pages, like you do with children:each.
When you define scope, only this page and any of it's (grand)children will be used.
You can also set limit, offset etc like with children:each.