[TYPO3-irre] using a recordselector
Steffen Kamper
steffen at sk-typo3.de
Sat Jul 28 12:02:19 CEST 2007
"Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag
news:mailman.1.1185578330.16311.typo3-project-irre at lists.netfielders.de...
> Hi,
>
> I'm lost and the manual doesn't help me with my problem.
> The manual says:
>
> " Record selectors support the editor to create relations to a given set
> of elements. A selector could be a simple selector-box or an element
> browser. The selector-box implements the TCA type "select" and shows
> records which are globally available. The element browser uses the TCA
> type "group" with the subtype "db". It opens a new pop-up window which
> shows the page structure and enables to select records from the accordant
> page."
>
> When i look to the given source, the param "foreign_selector" seems to be
> the important one. But all tries never showed a recordselector.
>
> Also this seems to be available only in m:n relation.
>
> What I try is a simple record selector in 1:n relation and I don't get
> one.
> How can I do that?
>
> vg Steffen
>
now i digged in the code, and i tried this in function
renderPossibleRecordsSelector
if ($selConfig['type'] == 'select') {
$item = $this->renderPossibleRecordsSelectorTypeSelect($selItems, $conf,
$selConfig['PA'], $uniqueIds);
} elseif ($selConfig['type'] == 'groupdb') {
$item = $this->renderPossibleRecordsSelectorTypeGroupDB($conf,
$selConfig['PA']);
} else {
$item = $this->renderPossibleRecordsSelectorTypeGroupDB($conf,
$selConfig['PA']);
}
and i get a elementbrowser with all my needs.
I know this is quick and dirty, but only by looking to this code i saw that
normally i only get a record selector, if the foreign_selector has type
select or dbgroup, but i have other types.
So maybe this helps to enable element browser for normal types.
vg Steffen
More information about the TYPO3-project-irre
mailing list