[TYPO3] Second disabled field?

Bernhard Kraft kraftb at kraftb.at
Sat Aug 5 03:40:33 CEST 2006


Oliver Schröder wrote:
> Hi list,
> 
> in table 'pages' the disabled field is set to 'hidden' by default.
> ($TCA['pages']['ctrl']['enablecolumns']['disabled'] = 'hidden';)
> 
> How can I add a second disabled field?

What would you like to use it for ?

I required "two" disabled/hidden flags for tt_address for allowing a direct-mail
subscription to be approved by two persons (the person which registered himself and
a person from the company - this was about a press-service).

I implemented it by writing "3" into the field when the record was created - which
means: "11" in binary and should expres both hidden fields.

When one of the recepitents accepted the subscription each time one of the both
bits was cleared. As the record in TYPO3 get selected with "hidden=0" this works
properly.

I guess you could make the pages disabled field a multiple checkbox by changing
the TCA definition for the hidden field by adding 'items':

'config' => array(
 ...
 'items' => array(
    array('First hidden Checkbox', ''),
    array('Second hidden Checkbox', ''),
 ),
 ...
),


But you will not be able to give different access rights to the single checkboxes.

To achieve this you would have to code some TCA user function or tcemain hook ...


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]



More information about the TYPO3-english mailing list