# Problems with search\_behavior

**URL:** <https://www.ruby-forum.com/t/problems-with-search-behavior/74746>\
**Category:** Radiant CMS\
**Created:** [November 7, 2006, 10:55am UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746 "2006-11-07T10:55:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 7, 2006, 10:55am UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/1 "2006-11-07T10:55:01Z")

</div>

Hi,

I’ve just installed Oliver’s search\_behavior via svn. However, I don’t  
understand how to implement it. Can somebody please provide a clearer  
example on how to do this. I’ve copied and pasted Oliver’s example in a  
new page title search.

\<r:search:form /\>

* * *
  
\<r:search:empty\>  
No match.  
\</r:search:empty\>  
\<r:search:results\>  
Results:  

  
\<r:search:results:each\>  
-   
\<r:link/\> by \<r:author/\>  
  
\</r:search:results:each\>  

  
\</r:search:results\>

However, when I navigate to that url I get

undefined tag `search’ undefined tag`search’  
undefined tag `search’

Does this mean that gallery\_behavior wasn’t installed succesfully?

Jose.

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 7, 2006, 10:55am UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/2 "2006-11-07T10:55:04Z")

</div>

Jose,

I implemented my search as a search box in the masthead of my site  
like this:

Where “/search-results” is the only page with the Search behavior  
selected and that page looks like this:

\<r:search:empty\>  
No match.  
\</r:search:empty\>  
\<r:search:results\>

## Search Results:

- 

You said below “Does this mean that gallery\_behavior wasn’t installed  
succesfully?” Assuming you meant search\_behavior, you might double  
check that you’ve selected the Search Behavior from the list. If you  
hadn’t, that’s the problem, if you had then I’ll bump this to the  
next person… I’ve no idea.

Hope that helps.

Good luck,

Loren

On Nov 2, 2006, at 8:30 AM, removed\_email\_address@domain.invalid wrote:

> ```
> <r:search:empty>
> </ul>
> 
> ```
> 
> Jose.
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

Loren J.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 7, 2006, 10:55am UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/3 "2006-11-07T10:55:31Z")

</div>

Ok I got it working I just didn’t notice I had to set the search  
behavior  
for the page.

jose.

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 8, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/4 "2006-11-08T15:51:24Z")

</div>

Loren,

Thanks for your help. I got it working fine as you’ve suggested in the  
masthead of the site, and I’ve also tested in the sidebar.

Why are you using the html form action instead of the \<r:search:form /\>  
tag?

Jo.se.

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 8, 2006, 4:27pm UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/5 "2006-11-08T16:27:34Z")

</div>

Our search form is embedded in the masthead of the site and hence  
shows-up on every page. I believe the \<r:search:form /\> tag is  
implemented as a behavior tag so we’d have to make every page part  
have the Search behavior if we wanted to use it.

Loren

On Nov 8, 2006, at 7:50 AM, removed\_email\_address@domain.invalid wrote:

> > Jose,
> > 
> > ```
> > </r:search:results:each>
> > 
> > ```
> > 
> > Hope that helps.
> > 
> > > I’ve just installed Oliver’s search\_behavior via svn. However, I  
> > > No match.  
> > > \</r:search:results\>
> > > 
> > > * * *
> > 
> > * * *
> > 
> > Radiant mailing list  
> > Post: removed\_email\_address@domain.invalid  
> > Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> > Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

Loren J.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![p0pnfresh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7cd45c/32.png) [@p0pnfresh](https://www.ruby-forum.com/u/p0pnfresh)\
**Post date:** [November 8, 2006, 5:05pm UTC](https://www.ruby-forum.com/t/problems-with-search-behavior/74746/6 "2006-11-08T17:05:41Z")

</div>

Loren,

Ok. I get it.

I’ve done it differently though.

I’ve set the \<r:search:form /\> inside the “no-map” content part of my  
/search/ page (no-map is used to exclude pages from the Sitemap  
snippet).

And then, inside the header snippet, I’ve included the following code:

\<r:find url="/search/"\>  
\<r:content part=“no-map” /\>  
\</r:find\>

This way the search form shows on every page’s header and the search  
behavior is only set in the /search/ page.

Jose.
