Radiant CMS Search Extension

I was evaluating Radiant CMS for a site Kyle and I are developing, and couldn’t for the life of me find any documentation for the Radiant CMS search extension (though there was a thorough doc for the mailer extension). So here’s a little example of what I came up with looking at the ruby code for the extension itself.


<r:search:form label="" />
<r:search:empty>
   <h2>No Results</h2>
</r:search:empty>
<r:search:results>
   <h2>Search Results</h2>
   <r:search:results:each>
      <r:search:results:content />
   </r:search:results:each>
</r:search:results>

In a nutshell, this will show “No Results” in an h2 tag if there were no results found, otherwise, the search results for the query will be displayed below the search form.

Here are some of the search tags

  • <r:search:form> will display the search form (I modified the code to add the button)
  • <r:search:empty> renders the html block if there are no results
  • <r:search:results> renders the html block if there are results
  • <r:search:results:each> renders search results
  • <r:search:results:each:content> will render the content of each search results

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.