Wes Bangerter wrote:
> I've added search to a website I'm working on using the
> search_behavior plugin, and everything is working fine. I noticed on
> the ruby-lang.org site that the search there is a lot nicer though. It
> includes a bit of content from each page it finds with the search
> phrase highlighted. I think it's also excluding some pages (I couldn't
> get it to list the "page missing" page in its results). Is anyone here
> familiar with how that page on ruby-lang.org works? Is it still using
> search_behavior? Is it possible to get the search_behavior in the
> radiant subversion repository working like that?

Ruby-Lang is using a modified version of Oliver Baltzer's search behavior:

http://rubyidentity.org/ruby-lang.org/browser/ruby-lang.org/trunk/www/vendor/plugins/search_behavior/

Here's the code that makes it work:

<r:search>
   <r:if_query>
     <r:empty>
       <p>No matches.</p>
     </r:empty>

     <r:results:each>
       <h3><r:link><r:excerpt><r:title/></r:excerpt></r:link></h3>
       <p><r:excerpt radius="200"><r:content /></r:excerpt></p>
     </r:results:each>

     <hr class="hidden" />

     <form id="search-again-form" action="<r:url />" method="get">
       <p><r:input /> <input type="submit" value="Search Again" /></p>
     </form>
   </r:if_query>
   <r:unless_query>
     <form id="search-again-form" action="<r:url />" method="get">
       <p><r:input /> <input type="submit" value="Search" /></p>
     </form>
   </r:unless_query>
</r:search>

--
John Long
http://wiseheartdesign.com
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to