[Typo3-dev] how to create an individual search-form in anextension
=?ISO-8859-15?Q?Mischa=20Hei=DFmann=20
typo3 at heissmann.org
Thu Oct 27 16:50:57 CEST 2005
For all of you, who need the same advice/sollution:
1. Create a Searchmask of your own. Therefor use the "function pi_list_
searchBoxec($tableParams='')" from your newly created extension.
2. Change the "$res = $this->pi_exec_query('yourextensiontable')" to
$res = $this->pi_exec_query('yourextensiontable',0,$addWhere='',$mm_
cat='',$groupBy='',$orderBy='',$query='');
3. Use the _POST-function for creating your needed WHERE-String. eg.:
<input type="text" name="search_cat" value=""> will be:
t3lib_div::_POST('search_cat')
So you can make 'AND WHERE uid = '.t3lib_div::_POST('search_cat')
That's all. Thank you Wolfgang for your hint.
Mischa
In <mailman.7113.1130260221.10463.typo3-dev at lists.netfielders.de>
Wolfgang Klinger wrote:
>
> Hi!
>
> On Tue, 25 Oct 2005, =?ISO-8859-15?Q?Mischa=20Hei=DFmann=20 wrote the
> following:
>> How do I set up this form?
>
> Possibly with a template system
> (http://typo3.org/extensions/repository/search/smarty/)
>
>> How can I use it within my extension?
>
> If you derive your class from tslib_pibase and name your input fields
> like "tx_myext_pi1[something]" you can access the values with
> $this->piVars['something'] or simply use $_GET or $_POST if you don't
> care.
>
>> How can I search within my tables?
>
> With SQL :-) (??)
>
>> How can I make it using the ListView made by the kickstarter?
>
> A personal advice: create your own list view, the kickstarter creates
> a minimal framework, nothing else.
>
>
> bye
> Wolfgang
>
>
>
More information about the TYPO3-dev
mailing list