Results 1 to 10 of 10

Thread: How to use taxonomy module inside own extension

  1. #1

    Default 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

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: How to use taxonomy module inside own extension

    Code:
    'root' => array(1,2,3,4)
    since you can specify many roots.

  3. #3

    Default 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

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default 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'];

  5. #5

    Default 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
    		),

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: How to use taxonomy module inside own extension

    you didn't read it correctly, the rootid goes INSIDE the eval section. Look again.

  7. #7

    Default 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

  8. #8

    Default 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

  9. #9

    Default 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

  10. #10
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default 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))

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •