[TYPO3-english] How to fix max image width for page content?

JoH asenau info at cybercraft.de
Fri Sep 17 11:50:33 CEST 2010


> Max 2 images (for imagein text)
> Postion left and right only
> 
> I tried to define something like styles.content.imgtext.imgMax = 2
> but my users are still able to insert more images than this limit.
> What am I doing wrong here?

You are trying to use TypoScript where it's inappropriate.
TypoScript is used for frontend output only, while what you want to do is related to backend forms.

To remove values from a selectbox of a backend form you can use TSconfig.
There are two types page and user TSconfig and it depends on what exactly you want to do, which one will be right for you.

Page TSconfig will set stuff that will behave the same way for all users, while User TSconfig will change things differently for different users and/or usergroups.

Something like

TCEFORM.tt_content.imageorient.removeItems = 0,1,2,3,4,5

should do the job. Just fill in the numbers of the variants you don't want to appear.

Read the TSconfig documentation for further information.

To change the maximum number of images to be uploaded you have to edit the extTables.php file that is located in your typo3conf directory.

$GLOBALS['TCA']['tt_content']['columns']['image']['config']['maxitems'] = 2;

You can find the array structure for all these settings when looking at "Configuration" in the left menu of the backend.
Select $TCA in the selectbox and then click your way through the tree.

The available options for the configuration can be found in the API-documentation.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com


More information about the TYPO3-english mailing list