[Typo3-UG UK] I need some assistance with the search of typo3

Adrian Yeeles a.yeeles at synergy-communications.co.uk
Thu Apr 22 14:26:57 CEST 2004


Nicolas

> On my template, I would like to be able to place the search input text 
> on a particular area.
> The area on my template is defined by the markup “###SEARCHSTRING###”.
> I would like to have this in all pages and to have results presented 
> on another page that opens within the same window (_self), and to be 
> able to search in headers, keywords, and content.

OK go to the top level page you want the search form to appear on, add 
a typo3 template and do something like

page.10 = TEMPLATE
page.10 {
   template = FILE
   template.file = your_template_file_with_###SEARCHSTRING###_on_it.tmpl
   workOnSubpart = DOCUMENT_BODY
   marks {
       SEARCHSTRING = FORM
       SEARCHSTRING.redirect = uid_of_page_to_show_results
       SEARCHSTRING.dataArray {
           10.label = SEARCH
           10.type = sword=input, 15
           10.value =
           20.type = scols=hidden
           20.value = pages.title:tt_content.bodytext
           30.type = stype=hidden
           30.value = LO
           40.type = submit=submit
           40.value = GO
        }
}

This assumes you have:

A	uploaded the appropriate template file with ###SEARCHSTRING### in it 
to somewhere in /fileadmin (not forgetting to put <!-- 
###DOCUMENT_BODY### begin --> and <!-- ###DOCUMENT_BODY### end --> 
immediately after the <body> and immediately before the </body> 
respectively of your html template).

B	Made the page "uid_of_page_to_show_results" with a content element of 
the type "Search".

Every page that uses the same set-up (html template, typo3 template) 
and can inherit from the first page with the search form on it will 
also have the search form on it.

Of course you could use TemplaVoila instead to map to a location in 
your html file but perhaps that can wait till you've gained some more 
experience with Typo3.

> I am new to typo3 and I am still struggling to understand the TSref.

Expect a long struggle.... but well worth it! Good luck.

regards

Adrian Yeeles
Technical Director

Synergy
t: 020 7251 0303
f: 020 7251 0323
isdn 020 7251 1133
http://www.synergy-communications.co.uk

---------------------------------------------------------------
This email is confidential. If you received it by mistake,
please let us know and then delete it from your system;
you should not copy, disclose, or distribute its contents to
anyone nor act in reliance on this e-mail, as this is prohibited
and may be unlawful. Any views or opinions are solely those
of the author and do not necessarily represent those of
Synergy Communications Ltd unless specifically stated.
---------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2950 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-uk/attachments/20040422/905940b5/attachment.bin 


More information about the TYPO3-uk mailing list