[TYPO3] searchbox with TemplaVoila

Vandemaele David david.vandemaele at telenet.be
Thu Apr 27 11:54:45 CEST 2006


Erik Svendsen schreef:
> 
> I don't know, but I have dropped the macina searchbox, and are using 
> this code instead to get a seachbox on every page.
> 
> Following in constants
> -- cut --
> plugin.tx_indexedsearch.searchUID = 82 #the uid of the search page
> plugin.tx_indexedsearch.showAdvanced = 0 #tells it to not show the link 
> advanced search.
> -- cut --
> 
> Following in root template TS
> 
> lib.searchBox = COA_INT
> lib.searchBox {
> stdWrap.prefixComment = 2 | lib.searchBox
> 
> 10 = TEXT
> 10.typolink.parameter = {$plugin.tx_indexedsearch.searchUID}
> 10.typolink.returnLast = url
> 10.wrap = <form action="|" method="post" id="search"><label 
> for="sword">Search:&nbsp;</label>
> 
> 20 = COA
> 20 {
> wrap =  | 10 = TEXT
> 10.data = GPvar : tx_indexedsearch |sword
> 10.wrap = <input name="tx_indexedsearch[sword]" value="|" id="sword" 
> type="text" />
> 
> 20 = COA
> 20 {
> wrap = |
> 10 = TEXT
> 10.value = <input type="hidden" name="tx_indexedsearch[sections]" 
> value="0" />
> 20 = TEXT
> 20.value = <input name="tx_indexedsearch[submit_button]" value="Search" 
> type="hidden" />
> 30 = TEXT
> 30.value = <input class="go-button" 
> src="fileadmin/templates/t3no/images/button-go-normal.gif" //
> onmouseover="this.src='fileadmin/templates/t3no/images/button-go-mouseover.gif'" 
> //
> onmouseout="this.src='fileadmin/templates/t3no/images/button-go-normal.gif'" 
> alt="Submit" type="image" />
> # code to get a image to change when you have your mouse over it. All 
> one one line.
> }
> }
> 
> 40 = COA
> 40 {
> wrap = |
> 10 = TEXT
> 10.value = Advanced search ?
> 10.typolink.parameter = {$plugin.tx_indexedsearch.searchUID}
> 10.typolink.additionalParams = &tx_indexedsearch[ext]=1
> 10.wrap = |
> if.isTrue = {$plugin.tx_indexedsearch.showAdvanced}
> }
> 
> wrap = | </form>
> }
> 
> Where I have used Macina Searchbox i have made a content element in 
> Storage Folder with the plugin for Macaina Searchbox, and made following 
> kode in the TS
> 
> lib.search=RECORDS
> lib.search.tables=tt_content
> lib.search.source=410 #the id of the macina searchbox
> 
> plugin.tx_macinasearchbox_pi1 {
>     pidSearchpage = 170
>     templateFile = 
> fileadmin/templates/nye_eriksverden/ext_templates/macsearch_template.html
> }
> 
> Hope this helps you.
> 
> I'm using TV.
> 
> WBR,
> Erik Svendsen
> www.linnearad.no
> 
> 

Looks very interesting. I'll have it a look. Thx!



More information about the TYPO3-english mailing list