[TYPO3-english] $TCA ignore pid and load all records into select box

Jigal van Hemert jigal.van.hemert at typo3.org
Wed Jun 26 19:46:57 CEST 2013


Hi,

On 26-6-2013 16:48, Muriel le Pair wrote:
> In the BE I want to load all records of an other table into a select
> box, since these records are part of the extension it should ignore the
> pid.
>
> I tried setting rootLevel to 1, but somehow that doesn't make any
> difference:
>
> 'language' => array(
>      'exclude' => 0,
>      'config' => array(
>          'type' => 'select',
>          'foreign_table' =>
> 'tx_sfcodehighlighter_domain_model_languageall',
>          'rootLevel' => 1,
>          'minitems' => 0,
>          'maxitems' => 1,
>      ),
> ),
>
> "If set, the "foreign_table_where" will be ignored and a "pid=0" will be
> added to the query to select only records from root level of the page
> tree."
> http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html

This setting ignores whatever is set in 'foreign_table_where' (which you 
don't use, so no change here) and adds 'pid=0'. The last part will only 
show records that are in the root of the site (the page with the TYPO3 
logo), but no other pages/folders.

Without that setting you should see all records in the entire 
installation, except those from pages where the user that edits the 
record doesn't have access to.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list