# Searchable tag reference

**URL:** <https://www.ruby-forum.com/t/searchable-tag-reference/85153>\
**Category:** Radiant CMS\
**Created:** [February 10, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153 "2007-02-10T18:16:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [February 10, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153/1 "2007-02-10T18:16:27Z")

</div>

Ok I really want to submit this to the Mental branch please  
Can somebody explain to me how to upload files with a ticket?

I decided that the tag reference was too long to scroll through, so I  
added a search box to it.

To use my search box, modify edit.rhtml like so:

===================================================================  
— edit.rhtml (revision 326)  
+++ edit.rhtml (working copy)  
@@ -190,7 +192,12 @@  
\<% end %\>

- 
### Available Tags for \<%= @page.class.display\_name %\>
+ + 
search tags:
+ + + 
### Available Tags for \<%= @page.class.display\_name %\>
+ 
\<%= tag\_reference(@page.class.name) %\>

\<%= link\_to\_function 'Close', "Element.hide('tag-reference-popup')", :class =\> 'close-link' %\>

This will add a search box and include my div\_text\_search.js (seperate  
file)  
Which you can grab here:

[http://jotapajaro.com/dump/div\_text\_search.js](http://jotapajaro.com/dump/div_text_search.js)

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [February 19, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153/2 "2007-02-19T16:26:07Z")

</div>

Now in Trac:

[http://dev.radiantcms.org/radiant/attachment/ticket/481/searchable-tag-ref.diff](http://dev.radiantcms.org/radiant/attachment/ticket/481/searchable-tag-ref.diff)

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [February 20, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153/3 "2007-02-20T20:27:43Z")

</div>

Jacob B. wrote:

> Now in Trac:
> 
> [http://dev.radiantcms.org/radiant/attachment/ticket/481/searchable-tag-ref.diff](http://dev.radiantcms.org/radiant/attachment/ticket/481/searchable-tag-ref.diff)

Very interesting. Can you clean up the Javascript so that it uses the  
built in prototype.js functions?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [February 20, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153/4 "2007-02-20T20:45:15Z")

</div>

John W. Long wrote:

> Very interesting. Can you clean up the Javascript so that it uses the  
> built in prototype.js functions?

What sort of cleanup did you have in mind?

I just learned the other day (after I had already written this) that you  
can find elements like this:  
$$(‘div.tag-reference’)

I could use that to replace my getAllDivsOfClass

Did you see any other places where Prototype could help?

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [February 20, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/searchable-tag-reference/85153/5 "2007-02-20T20:57:52Z")

</div>

Jacob B. wrote:

> I could use that to replace my getAllDivsOfClass  
> I think that’s the main area that should be cleaned up, though  
> document.getElementsByClassName() may be faster than  
> $$(‘div.tag-reference’).

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
