Hi. I'm new to Radiant, and still stumbling around the code.
I've written a filter to interpret pages written in YAML. Radiant won't
run it -- it seems that it chokes on the 'require' statement. Remove
the statement and it seems to choke on the rest of it. Can anyone
advise?
require 'YAML'
class PublicationsFilter < TextFilter
description_file File.dirname(__FILE__) + "/../publications.html"
def filter(text)
data = YAML::load(text)
html = ""
data.each { |book|
code = <<EOF
<div class="book">
<img src="http://{book['image']}" />
<h3>#{book['title']}</h3>
<p class="description">#{book['description']}</p>
</div>
EOF
html << code
}
html
end
end
--
Bruno
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant