This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Apr 10 11:17:35 -0700 2009 | |
| |
README.textile | Thu Apr 09 14:50:45 -0700 2009 | |
| |
Rakefile | Fri Feb 06 10:16:10 -0800 2009 | |
| |
app/ | Thu Apr 16 10:51:12 -0700 2009 | |
| |
db/ | Fri Mar 06 12:57:31 -0800 2009 | |
| |
lib/ | Thu Apr 16 10:51:12 -0700 2009 | |
| |
page_options_extension.rb | Thu Apr 16 10:51:12 -0700 2009 | |
| |
spec/ | Wed Apr 15 10:27:49 -0700 2009 |
README.textile
Page Options
Extension for Radiant CMS which enables per page admin options, such as setting caching to a non-default value, or turning it off altogether
- Created by: Andrew vonderLuft
- Contact: avonderluft [at] avlux [dot] net
Revision History
- 1.0 – 4/2009 – Radiant 0.7 compatible, per page caching options
Requirements
- Radiant 0.7 or greater
- no other known dependencies
Installation
From your RADIANT_ROOT:
$ script/extension install page_options
- Restart your radiant app, and you should be good to go.
To Do
- Other per page options — suggestions most welcome
Notes
Page Caching
- Available to admin users only. You can change this by removing “if current_user.admin?” from the top of the caching_meta template.
- The cache_expire_time is being set with a text field with no validation for a few reasons:
- The time_select in rails has issues when the :include_blank => true option is set, viz. it consistently throws multi-parameter assignment errors.
- At validation time the text entered has already been parsed into a Time object, therefore attempting validates_format_of with a regex for hh:mm is pointless.
- Consequently, if you enter “www” it will parse the input into Time 00:00 (midnight). To avoid possible confusion, I hare added Current Setting in the meta partial.
- Expire time displays as hh:mm:ss, due to fact that it is a Time object being handled by ActiveRecord, but it is entered as hh:mm, with seconds defaulting to 00.
Acknowledgments
As always, Sean Cribbs lent assistance with the finer points of Ruby, Rails and Radiant. The Jupiter of Holst is still exquisite, even if it is a little bit of overkill for a podcast.







