[Typo3-dev] using flexform in extension records
Tonni Aagesen
goto at dev.null
Tue Sep 7 11:43:18 CEST 2004
Luite van Zelst wrote:
> not quite... (if I understand it correctly).
> suppose you have to fields in the tca, the first field we'll call "flex"
> of type flex, and the second is a selector-box, we'll call
> "mydspointer". Ok, now fill the mydspointer with 3 items (all having a
> label and a value), the value of the item in the selectorbox selected by
> the user is used to point to an element of the "ds=> Array (..." array
> of the flex field. I think there's actually an example of this in the
> core api, if you look closely.
> So if the seletorbox has "First type" => "one", "Second DS" => "two" the
> ds should look like:
>
> "ds" => Array( "one" => "<xml somexml>", "two" => "someotherxml")
>
> but I agree it is a bit confusing.
> make sure to have the selectorbox accept non-numerical values if you
> follow this example (there's a tca options for that).
Just to make sure I understand your example correctly:
The "flex" entry is but pointers to some XML either defined directly or
in a file.
The "mydspointer" is a selctor-box that gives the user the ability to
select a flexfom/XML. Each item in the selector-box should then point to
a key in the "ds" array.
Is that correct?
I'm using flexform to give the possiblity of having multiple languages
in a record - is that not the intension of flexform (among other
things)? So far, I've only seen examples where flexform is used to
provide extra options in setting up an extension (eg. news and mininews).
By the way, thank you for the answer - I was beginning to wonder if I
was asking the right place :)
--
Best regards
Tonni Aagesen
www.cazoo.dk
More information about the TYPO3-dev
mailing list