[Radiant] Implementing a tag for outputting radiant tags?

Sean Santry sean at seansantry.com
Wed Nov 1 22:05:54 CST 2006


So I've put together a couple of plugins for Radiant, which plugins  
provide some global tags. Now I'd like to write about these tags on  
my Radiant-powered web site.

That is, I'd like to be able to write something like:

	<pre><code><r:blah foo="bar"><r:link/></r:blah></code></pre>

_without_ the <r:blah> tag being executed and replaced by its output.  
The <r:escape> tag doesn't help, since the <r:blah> tag gets expanded  
first, then its output is escaped.

I was thinking of creating a simple "echo" tag, like

Behavior::Base.define_tags do
   tag "echo" do |tag|
     tag.contents
   end
end

but obviously there's no "contents" property (or "body" or "text" or  
any other variation I could think of). I've looked through radius.rb,  
and page_context.rb, but don't see a way.

If someone could point me in the right direction, I'm happy to do the  
work. I just don't know where to start . . .

- Sean



More information about the Radiant mailing list