David Piehler wrote: > Jan frederik Poulsen wrote: >> Any help? I'm getting a bit desperate? :-( > > The newest Search Extension code is in GitHub: > http://github.com/radiant/radiant-search-extension/tree/master > > However, it removes the live search functionality. You might want to use > the download link and try it out anyways, because it should accomplish > your other goals. > > - Dave
Also, here are my notes on using an older version of the Search Extension. This might be helpful to you. $ cd PATH/TO/PROJECT $ svn export http://svn.radiantcms.org/radiant/tags/rel_0-6-6/extensions/search vendor/extensions/search Add a new tag to /PATH/TO/PROJECT/vendor/extensions/search/app/models/search_page.rb ### 2008-05-21 DP added new tag to check if a search has been submitted desc %{ Checks if a query was passed to the browser.} tag 'search:if_submitted' do |tag| unless @query == "" tag.expand end end Be sure to set the Page Type to "Search" or else loading the page will fail with an error about a missing tag. The following is a good default Search page… <r:search:form label="Search for:"/> <div id="search_results"> <r:search:if_submitted> <r:search:empty> <h2>Searching '<r:search:query/>' returned no results.</h2> </r:search:empty> <r:search:results> <h2>Searching '<r:search:query/>' returned:</h2> <r:search:results:each> <r:unless_content part="no-search"> <p> <r:link/><br /> <r:truncate_and_strip length="210"><r:content/></r:truncate_and_strip> </p> </r:unless_content> </r:search:results:each> </r:search:results> </r:search:if_submitted> </div> You can prevent pages from being returned by adding a 'no-search' page-part to them. The above tag <r:unless_content part="no-search"> is used to hide all pages with a page-part of ‘no-search’ in the search results. This can result in searches that return “Your search for ‘X’ returned the following pages:” with no results below, but its better than showing hidden pages. - Dave -- Posted via http://www.ruby-forum.com/. _______________________________________________ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant