DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: Search form: Prefilled search phrase¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed by: | Sven Burkert |
Changed: | 2009-07-21T08:49:49 |
Classification: | searchformprefilled |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | forAdmins, forBeginners |
Author: | Sven Burkert |
Email: | sventb@gmail.com |
Info 4: | |
Language: | en |
EXT: Search form: Prefilled search phrase - searchformprefilled
EXT: Search form: Prefilled search phrase¶
Extension Key: searchformprefilled
Language: en
Keywords: forAdmins, forBeginners
Copyright 2000-2008, Sven Burkert, <sventb@gmail.com>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
EXT: Search form: Prefilled search phrase 1
`Introduction 3 <#1.1.Introduction|outline>`_
`Configuration 4 <#1.2.Configuration|outline>`_
`To-Do list 5 <#1.3.To-Do%20list|outline>`_
`ChangeLog 6 <#1.4.ChangeLog|outline>`_
Introduction¶
What does it do?¶
Shows search results on your page for the search phrase the visitor looks for via google or yahoo.
Ok, first things first, here's a concrete example:
User goes to google (or some other search engine) and searches for “sbtheke javascript”:
Then the user clicks on one of these search results – but you have (re)moved this page or changed your speaking urls or whatever. The user is redirected to the page “404 – page not found”. That's really basic.
Now the magic: If your browser submits the HTTP_REFERER, a search form is displayed and a search for the keywords you looked for in google is performed on your site:
Configuration¶
- After installing this extension you should add the template “Prefilled search form” in field “Include static (from extensions)” in your ROOT page.
- Now add the plugin “Search (prefilled)” into a page (I suggest the 404 error page)
- Don't forget to set the TypoScript property :underline:`**pidSearchFormRedirect**` !
TS Setup¶
plugin.tx_searchformprefilled_pi1
httpReferer¶
Property
httpReferer
Data type
string
Description
If you want to test this plugin and display some search results, use this property
Default
templateFile¶
Property
templateFile
Data type
string
Description
Location of the template
Default
EXT:searchformprefilled/pi1/template.html
pidSearchFormRedirect¶
Property
pidSearchFormRedirect
Data type
integer
Description
Page-ID of the page where you provide the search. It's highly recommended to set this property, because the user should be redirected to the page where your users usually perform searches, he really shouldn't do this on the 404 error page.
Default
searchForm¶
Property
searchForm
Data type
string
Description
Your preferred search plugin. indexed_search is recommended, but the default TYPO3 search form is also available (just type “default” or something else for this property).
Default
indexed_search
alwaysDisplaySearchForm¶
Property
alwaysDisplaySearchForm
Data type
boolean
Description
The search form is always displayed, even if there's no HTTP_REFERER
Default
0
defaultSearchForm¶
Property
defaultSearchForm
Data type
Description
Configuration of default TYPO3 search form, if you use indexed_search, you don't need this.
Default
defaultSearchForm.scols¶
Property
defaultSearchForm.scols
Data type
string
Description
See TYPO3 manual
Default
pages.title-subtitle-keywords-description:tt_content.header-bodytext- imagecaption
defaultSearchForm.stype¶
Property
defaultSearchForm.stype
Data type
string
Description
See TYPO3 manual
Default
L0
Usage:
If you want to overwrite the default settings, you can do this in TypoScript setup field.
Example:
plugin.tx_searchformprefilled_pi1 {
searchForm = default
httpReferer = http://www.google.de/search?q=sbtheke+javascript
pidSearchFormRedirect = {$searchPagePID}
}
To-Do list¶
Tell me what you miss