[TYPO3-core] RFC: #6825: TCEforms -- Icon for empty palettes should not be displayed
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sat Nov 24 20:03:52 CET 2007
Benjamin Mack schrieb:
> Hey all,
>
> This is a SVN patch request.
>
> Branches: Trunk only
>
> Problem:
> when using pageTSconfig to disable certain fields that are on the second
> options palette, the icon to display the options palette is shown even
> if all 2nd options are disabled. This is totally bad if a user clicks on
> it and nothing happens.
>
> Solution:
> Therefore we need a check to see if the palette is empty or not before
> rendering the "more options" icon.
Basically yes, but I think this can be done better. You render but do
not output with getPaletteFields(). Caching the result may be tricky and
an overkill. But you could at least split the function up, so that one
part creates only the (internal) $palParts. You can use then
count($palParts) instead of trim($paletteContent). So we don't have to
intoTemplate() if we don't need to.
Masi
More information about the TYPO3-team-core
mailing list