[TYPO3-dev] Only showing a subset of items in a selectbox
Franz Koch
typo3.RemoveForMessage at elements-net.de
Tue Sep 7 11:59:55 CEST 2010
Hey Thomas,
...
> 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.
well, you could add a ext_conf template where you could configure the
PIDs for "manufacturers", "depots" etc and use this config in your TCA,
but I'd go the "dedication" way (see below).
> Hopefully that's understandable.
yes
> 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".)
This sounds pretty error prone IMHO. I also think that it would be nicer
to have different domain models for those cases in extbase - so you
would need some kind of "dedication" field in your database to use
singleTableInheritence. If you like to publish this extension, I'd go
this "clean" and save way.
If you decide to do so, but still would like to ease things up for your
customer, you could define TCAdefaults in each storageFolder and
preselect the dedication, so that editors don't have to care about it.
You could even hide the field from your editors, but then the
TCAdefaults don't work anymore (AFAIK) and you need to override the
values in TCEmain. I coded a extension once that let you override DB
values via pageTS - so that you can hide fields from editors but still
preset some field values (not sure if the core is by now up to this on
it's own).
--
kind regards,
Franz Koch
More information about the TYPO3-dev
mailing list