Forum: Radiant CMS Mental Tags - FormTagHelper?

66ea50b15982d1b33aeaaa6df0d7a1dd?d=identicon&s=25 Ryan Heneise (Guest)
on 2007-04-11 00:58
(Received via mailing list)
Is it possible to use FormTagHelper from within Radius tags?

I'm trying to do something like this:


module CommentTags
   include Radiant::Taggable
   include ActionView::Helpers::FormTagHelper

   tag "comment:text_field" do |tag|
     attrs = tag.attr.symbolize_keys
     text_field_tag(attrs[:name], attrs[:value]).inspect
   end

end

Thanks...
6ec6f77ea603dd75b3a7a7775b059e79?d=identicon&s=25 John W. Long (Guest)
on 2007-04-12 00:12
(Received via mailing list)
Ryan Heneise wrote:
>      attrs = tag.attr.symbolize_keys
>      text_field_tag(attrs[:name], attrs[:value]).inspect
>    end
>
> end
>

It's possible to make this work, but you will need to study the
FormTagHelper module to see which methods and instance variables it
depends on. I did a similar thing on a search plugin for Ruby-Lang.org
to use the builtin text helpers.

--
John Long
http://wiseheartdesign.com
This topic is locked and can not be replied to.