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.
configurable filter for backend tables¶
Created: | 2010-02-18T17:33:18 |
---|---|
Changed: | 2010-04-01T22:59:18 |
Classification: | be_tablefilter |
Author: | Bert Wendler |
Email: | bert.wendler@gmail.com |
Info 4: | |
Language: | en |
configurable filter for backend tables - be_tablefilter
configurable filter for backend tables¶
Extension Key: be_tablefilter
Language: en
Keywords:
Copyright 2000-2010, Bert Wendler, <bert.wendler@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¶
configurable filter for backend tables 1
`Introduction 3 <#1.1.Introduction|outline>`_
`Users manual 4 <#1.2.Users%20manual|outline>`_
`Administration 5 <#1.3.Administration|outline>`_
`Configuration 6 <#1.4.Configuration|outline>`_
`Known problems 7 <#1.5.Known%20problems|outline>`_
`To-Do list 8 <#1.6.To-Do%20list|outline>`_
`ChangeLog 9 <#1.7.ChangeLog|outline>`_
Introduction¶
What does it do?¶
- This extension provides easy configurable filters for backend tables in the List module. The filters work for every shown and configured column of your table or system table. For configuration you just have to extend you TCA with a quite straight forward config_filter block in addition to the well known config block.
- Filter criteria are kept in the BE user session.
- Filter criteria work for the csv-download as well.
Screenshots¶
will follow in the next version
Users manual¶
Just install the extension. If you don't see any filters after that – that's by design. You have to configure the filters first. See section Configuration on how to do this.
Administration¶
All configuration is done in the TCA. No special administration is needed.
Configuration¶
- You have to edit the TCA of your own extension. In the next version or one of the many to follow we might do a automatic mapping of column configuration to our filter configuration. For now we just needed easy configurable backend table filters and this is what the extension does.
- You have to add at least to entries to your TCA to see the filter
work:
- Add a key 'filter' => true to the 'ctrl'-Block of the table you want to be able to filter
- Add a block 'config_filter' to all columns of this table which you want to be available for filtering. This block follows the same syntax as the 'config' block. Both are configurations for a form field and are using the same tceform methods. For now we support only input, select, input (date eval), select (with foreign table). More will follow. There is only one option which is not part of the well known TCA options: fromto.
Reference¶
fromto¶
Property
fromto
Data type
boolean
Description
Use it for date fields. Usually you might need a filter for dates older or younger or between two dates.
Example:
'config' => array (
'type' => 'input',
'size' => '8',
'max' => '20',
'eval' => 'datetime',
),
'config_filter' => array (
'type' => 'input',
'size' => '8',
'max' => '20',
'eval' => 'date',
'fromto' => true,
)
Default
false
Known problems¶
- For creating the filter form fields we use the getSingleField_SW method of the tceforms class. This is not a private method but in a real OO language it probably would be. For now some things are working (date picker, selection of 1:m – linked database items), some are not (group selection for files or database entries).
- You have to use your own extension to be able to edit the TCA for the table to filter.
- We use the same hook for adding the filter form and adding the additional where's to the table selection SQL. There might be a better way to do this. If you think so – tell us.
To-Do list¶
- Automatic mapping for column configuration to filter configuration.
- Test and support more column types (checkboxes, integer fromto and many more). Please give as hints which would be needed most.