Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (59 sloc) 2.56 KB

Radiant Custom Fields Extension

About

An extension by Aissac that allows you to add custom fields to Radiant CMS pages.

Tested on Radiant 0.7.1, 0.8 and 0.9.

Checkout the screencast!

Features

  • Provides the ability to add custom fields to a Page;
  • The Page model is not changed: custom_fields are added as a belongs_to association;
  • Admin interface for managing assigned custom fields;
  • Radius tags for accessing custom fields.

Important Notice!

The git branches of this repository hold stable versions of the extension for older versions of Radiant CMS. For example the 0.8 branch is compatible with Radiant 0.8.

To checkout one of these branches:

git clone git://github.com/Aissac/radiant-custom-fields-extension.git vendor/extensions/custom_fields
cd vendor/extensions/custom_fields
git checkout -b <branch-name> origin/<remote-branch-name>

As an example, if you're working on Radiant 0.8 you will need to checkout the 0.8 branch:

cd vendor/extensions/custom_fields
git checkout -b my_branch origin/0.8

Installation

The Custom Fields Extension has no dependencies, so all you have to do is install it:

git clone git://github.com/Aissac/radiant-custom-fields-extension.git vendor/extensions/custom_fields

Then run the migration and the update:

rake radiant:extensions:custom_fields:migrate
rake radiant:extensions:custom_fields:update

Usage

Available Tags

  • See the "available tags" documentation built into the Radiant page admin for more details.
  • Use the <r:custom_field:value /> tag to render the value of a custom field.
  • Use the <r:custom_field:each /> tag to iterate over the assigned custom fields of a page.
  • Use the <r:custom_fields:if_matches /> and <r:custom_field:unless_matches> tags to filter the custom fields.

I18n

This extension is translated to English and Romanian.

If you happen to translate it to some other languages please send a pull request.

Patches

If you want to contribute features or fixes please write your specs/cucumber features and code and submit pull requests to these github users:

  • cristi
  • ihoka

Contributors

TODO

  • AJAX-ify admin interface.