[Typo3-dev] dynamic BE fieldlist?

Horn Gábor Horn.Gabor at aktiv.co.hu
Mon May 17 10:01:22 CEST 2004


Hi!

I'd like to ask for your advice on the following topic: is it possible
to change which fields appears when editing an own extension's element's
fields due to a row in the database? 
Here's an example:

I have 2 tables, first (tx_xxx_datarows) contains fields like field1,
field2, field3. The record of this table will be rendered as rows of a
HTML table in the FE. Now i have another table (tx_xxx_fieldnames) which
contains custom names for the datarows at a given pid. So it has fields
like field1title, field2title, field3title. On the FE thsi will be the
first row of the HTML table which contains the elements of the
tx_xxx_datarows DB table. 

So if at pid 50 i have the following entries in the DB ("," is field
separator, "|" is row separator):

tx_xxx_fieldnames: color, size, price
tx_xxx_datarows: red, 42, 34$ | blue, 40, 65$ | green, 38, 50$

It will result in a table in the FE:

color, size, price
red,   42,   34$
blue,  40,   65$
green, 38,   50$

Now the question is: can i do that "price" (third) field only appears
when editing tx_xxx_datarows elements in the BE if at the same pid
there's a tx_xxx_fieldnames element which has a nonzero field3title?
(assuming there's only one tx_xxx_fieldnames element for a pid).

The ultimate goal would be to display not "field3" but "price" (so the
content of tx_xxx_fieldnames.fieldXtitle) in the backend too. So if the
BE user decides to only show color and size attributes
(tx_xxx_fieldnames.field1title and tx_xxx_fieldnames.field2title then)
and edit the tx_xxx_fieldnames element accordingly, then when at the
same pid he edits the tx_xxx_datarows elements, he only would see the
"enabled" fields.

thx, hirisov






More information about the TYPO3-dev mailing list