[TYPO3-english] Custom indexed search form

Philipp Gampe typo3.lists at philippgampe.info
Sat Feb 4 22:03:38 CET 2012

Hi Sara ,

Sara Weale wrote:

> I have a page with pdfs listed (using file_list). I want to be able to
> offer a search of only these pdfs.
> Could someone point me to instructions on how to create a custom indexed
> search form, or another extension which searches only the files listed?
> The regular search (TS set rootline as current page) returns no results
> but advanced search (when set to search only this page) does.
> However, I don't want any advanced settings (or links to advanced search)
> visible on the page.

You can preset the options as hidden field for the form.

Have a look at the rendered html, you can just create your own form and put 
it as plain html.

Have a look at this sample.

<div class="tx-indexedsearch-searchbox"> 
<form action="http://example.org/search/" method="post" 
  <input type="hidden" name="tx_indexedsearch[_sections]" value="1"> 
  <input type="hidden" name="tx_indexedsearch[_freeIndexUid]" 
id="tx_indexedsearch_freeIndexUid" value="_"> 

  <input type="hidden" name="tx_indexedsearch[pointer]" 
id="tx_indexedsearch_pointer" value="0"> 
  <input type="hidden" name="tx_indexedsearch[ext]" value=""> 
  <input type="hidden" name="tx_indexedsearch[type]" value="1"> 
  <input type="hidden" name="tx_indexedsearch[defOp]" value="0"> 
  <input type="hidden" name="tx_indexedsearch[media]" value="-1"> 
  <input type="hidden" name="tx_indexedsearch[order]" value="mtime"> 
  <input type="hidden" name="tx_indexedsearch[group]" value="flat"> 
  <input type="hidden" name="tx_indexedsearch[lang]" value="-1"> 
  <input type="hidden" name="tx_indexedsearch[desc]" value="0"> 
  <input type="hidden" name="tx_indexedsearch[results]" value="50">
  <input type="hidden" name="tx_indexedsearch[freeIndexUid]" value="-1">
  <input type="hidden" name="tx_indexedsearch[extResume]" value="0">
  <input type="text" name="tx_indexedsearch[sword]" value="Suche..." 
class="tx-indexedsearch-searchbox-sword sword" 
  <input type="submit" name="tx_indexedsearch[submit_button]" value="Suchen" 
class="tx-indexedsearch-searchbox-button submit">

I have not worked with indexed_search for a while, but I think you can set 
those options also via TS. Have a look at the manual.

Best regards
Philipp Gampe – PGP-Key 0AD96065

More information about the TYPO3-english mailing list