How to use taxonomy module inside own extension
Hi,
How to use taxonomy module inside own extension?
Something like this?
'taxonomyRoot' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_requests']['taxonomyRoot'],
'inputType' => 'TaxonomyTree',
'eval' => array('mandatory' => true, 'fieldType' => 'radio'),
)
How do I specify the root?
Rgds,
Frederick
Re: How to use taxonomy module inside own extension
Code:
'root' => array(1,2,3,4)
since you can specify many roots.
Re: How to use taxonomy module inside own extension
Thx for the reply.
This is the code I used inside my fields array:
Code:
'module' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_requests']['module'],
'exclude' => true,
'search' => true,
'inputType' => 'TaxonomyTree',
'eval' => array('mandatory' => true, 'fieldType' => 'radio'),
'root' => array(1)
),
but I don't see anything displayed.
For the record, i've put module in the palette.
thx
Re: How to use taxonomy module inside own extension
i'll correct the location:
The version that is currently active doesn't support arrays of rootid's but the next version (for next catalog) will support multiple taxonomy roots.
$GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['eval']['rootid'];
Re: How to use taxonomy module inside own extension
Still doesn't work:
Code:
'module' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_requests']['module'],
'exclude' => true,
'search' => true,
'inputType' => 'TaxonomyTree',
'eval' => array('mandatory' => true, 'fieldType' => 'radio'),
'rootid' => 1
),
Re: How to use taxonomy module inside own extension
you didn't read it correctly, the rootid goes INSIDE the eval section. Look again.
Re: How to use taxonomy module inside own extension
I've adapted my code to:
Code:
'module' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_requests']['module'],
'exclude' => true,
'search' => true,
'inputType' => 'TaxonomyTree',
'eval' => array('mandatory' => true, 'fieldType' => 'radio','rootid' => '1')
),
but still no luck. Do I have to include the taxonomy class somewhere. I don't get any errormessage.
Thx,
Frederick
Re: How to use taxonomy module inside own extension
Do I need to do something special to use a widget from an other module?
Rgds,
F
Re: How to use taxonomy module inside own extension
Hi,
Now I know (I think) why it was not working. Widgets can't be used in the front-end.
Thx,
Frederick
Re: How to use taxonomy module inside own extension
I'm guessing but i think Thyon means
Code:
'eval' => array('mandatory' => true, 'fieldType' => 'radio', 'root' => array(1,2,3,4))