[TYPO3-dev] Only showing a subset of items in a selectbox

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Sep 6 19:48:36 CEST 2010


Franz Koch wrote:
> I still think a 'foreign_table_where' would be sufficient in your case.
> I assume your contacts table has a type field used for
> singleTableInheritance - right? So simply do this:
>
> 'foreign_table_where' => 'AND tx_yourext_domain_model_contact.type = 1'
> // if 1 is f.e. the type for manufacturers

Hello Franz,
thanks for your feedback, I appreciate it!

In my case the type field of the contact model is already used
for the types 'person' or/and 'corporation' to differ between those.

And for the possibility to select multiple "dedications" (that's
what I came up now with how I'd call it) I need to define it as a
multiple selectbox or render checkboxes.

Generally using a foreign_table_where would be just sufficient,
but I'm still wondering if there's a way to provide the editor 
(Redakteur) a simpler way of maintaining the contacts.

Imagine this:

In the backend it's common (at least for your clients/projects)
to create sysfolders for different types of a single record type.

Like for contacts, we would create 2 pages, one called "manufacturers"
and one called "depots". So the obvious separation of manufacturers and
depots for the editors is the storage on different sys-folders.

Adding another, dedicated field "dedications" would just add another
thing to maintain for the editors, besides the differentiation of 
storage places.

Hopefully that's understandable.

Therefor I think using a field of type 'group/db' would be the best way,
because then the user just needs to "navigate" to the correct sysfolder,
and select the desired contact. (One side effect of this is, that the
editors can even select contacts, regardless of their "dedication".)

Maybe I should aim for a configuration option inside the extension
manager configuration, to be able to swap between the solutions 
mentioned? (Storage page, group field, custom field "dedication".)

What do you think?

Thanks a lot,
Thomas




More information about the TYPO3-dev mailing list