Home > TYPO3 > New extension evo_chained_selector

New extension evo_chained_selector

November 10th, 2009

chainEvo_chained_selector is BE extension allows you to create relations between records by using “chained selection”
Origins of this associate with implementation we’ve worked on lately. Website contains expanded legal acts base with the structure as follow:


Legal acts -> article  -> paragraphs & chapters -> section

The editor while creating new record tt_news is able to connect proper paragraph to the new news. We thought over an elastic solution that would allow the editor quickly and effectively create new relations and we decided to develop this new module.
Evo_chained_selector is a mechanism based on ajax which analyzes structure of table indicated in:

#
  1. $TCA[$table]['field']['config']['params']['table']

and checks if selected in first input record possesses children, and if so, adds another input.
Records range in multiple choice field is dynamically limited while entering key word. This way each level can operate on unlimited number of records without causing long loading of record editing form

Integration in own BE modules

Relation is built with TCA type user, where in userFunc key one has to define call to  tx_evochainedselector_client->render function. Table to which we create relation has to have tree structure therefore parentField key should refer to parent_uid filed (in this case table pages: pid)

#tca.php
  1. "myfield" => Array (
  2.  "exclude" => 1,
  3.  "label" => "Select record",
  4.  "config" => Array (
  5.   "type" => "user",
  6.                 "userFunc" => "tx_evochainedselector_client->render",
  7.    'params' => array(
  8.     'table' => 'pages',
  9.     'parentField' => 'pid',
  10.     'title' => '###title###', // title of records in autocomplete form
  11.     'searchFields' => 'title', // which fields to search
  12.     'limit' => 20,
  13.     'order' => 'title',
  14.     'additionalWhere' => ''
  15.     )
  16.    )
  17.   ),
In the database is saved UID of the last selected element in the chain.

Screenshots

evo_chain_selector

evo_chained_selector

Zrzut ekranu 2009-10-29 (godz. 21.10.03)

evo_chained_selector

VIDEO

To do

This is th initial version of this extension. Many things can be improved and added.
Waiting for your suggestions and questions.

Files to download:

  • Share/Save/Bookmark

Bartosz Aninowski TYPO3 chain, prototype, select, tca

  1. ktostaki
    November 11th, 2009 at 08:41 | #1

    Jak ponad rok temu pytałem czy można takie coś robić w BE to dostałem odpowiedź, że nie bo BE jest cachowany ;) . Jeśli utrzymacie takie tępo to za rok zaczniecie robić ciekawe rzeczy po stronie BE powodzenia.

  2. November 16th, 2009 at 11:28 | #2

    Thank you … this has me very helped.

  1. No trackbacks yet.