Skip to content

Instantly share code, notes, and snippets.

View bloopletech's full-sized avatar

Brenton 'B-Train' Fletcher bloopletech

View GitHub Profile
# Radiant CMS grab-bag of features.
# Some of there are quite hackish in that that they copy+paste and then modify code from Radiant itself; thus a lot of this code might only work against version 0.6.9 of Radiant.
# Page extensions; in your extension create a file called lib/page_extensions.rb with the content:
module PageExtensions
def self.included(base)
base.class_eval <<-EODATA
#this snippet adds a has_content="true|false" attribute to the if_content tag, so that the tag only expands of content if the part exists, and if the part has non-blank content.
tag 'if_content' do |tag|