module SearchTags
include Radiant::Taggable
tag "search" do |tag|
tag.expand
end
tag "search:globalinput" do |tag|
url = tag.attr['url']
%{<form action="#{url}" method="get">
<p>
Search:<br />
<input type="text" name="q" />
<input type="submit" value="Go" />
</p>
</form>}
end
end
Page.class_eval { include SearchTags }
On 3/29/07, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> So if I wanted to roll this up in a tag, say call it
> search:globalinput, how would I go about doing this? Is there a simple
> way to just roll up a bunch of literal HTML into a tag? And having done
> so, how would I register it as being completely global, such that I
> could use it in the header or footer?
>
> Walter
>
> On Mar 28, 2007, at 11:03 PM, Adam Williams wrote:
>
> >
> > On Mar 28, 2007, at 7:31 PM, John W. Long wrote:
> >
> >> Assign the Search page type to your search results page. Then, to
> >> use it
> >> on other pages, just use normal *HTML* form tags:
> >>
> >> <form action="/search/" method="get">
> >> <p>
> >> Search:<br />
> >> <input type="text" name="q" />
> >> <input type="submit" value="Go" />
> >> </p>
> >> </form>
> >
> > Interestingly, when I first came to Radiant, I didn't even think
> > about not using tags...
> >
> > adam
> > _______________________________________________
> > Radiant mailing list
> > Post: [email protected]
> > Search: http://radiantcms.org/mailing-list/search/
> > Site: http://lists.radiantcms.org/mailman/listinfo/radiant
> >
>
> _______________________________________________
> Radiant mailing list
> Post: [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant