« December 2009»
S M T W T F S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

[blog...]

Currently the posts are filtered by: December 20
Reset this filter to see all posts.

20.12.2009
20:02

Add Searchbox for Indexed Search to Typo3 Page

I started now to add the Typo3 indexed search to some of my websites.

 

But how to add a searchbox on top of the website? There are several extensions for this, but some simple TypoScript is sufficiant. The following code in my template generates such a box (see on top of this page). The style is done of course by CSS.

 

temp.searchbox >
temp.searchbox = COA
temp.searchbox {

 

 

  20 = TEXT
  # pid of page including index_search plugin
  20.typolink.parameter = 46
  20.typolink.returnLast = url
  20.wrap = <form action="" method="post"><span>

 

 

 

 

  30 = TEXT
  30.value = <input name="tx_indexedsearch[sword]" value="Search item..." \
type="text" title="Search the homepage." onfocus="javascript:this.value=''" />

 

 

 

 

  40 = TEXT
  40.value = <input name="submit" value="Search" type="submit" class="submit" />

 

 

 

 

  50 = TEXT
  50.value = </span></form>

 

 

  wrap = <div class="absearchbox">
[ 29.01.2012 ]