TSconfig

1.2. User TSconfig

You can enter TSconfig for both backend users and groups. The resulting TSconfig for a certain backend user is the accumulated TSconfig for all the backend groups he's a member of. Thus you can override formerly set options from the user groups by entering another configuration in the TSconfig field of the user himself.

The "TSconfig" field

This is how the TSconfig for users is entered in the backend user records:

 


Verifying the final configuration

It's vital to check the resulting configuration of the users. You can do that in the Tools>User Admin (extension: beuser) module by clicking a username. Then you'll see the TSconfig tree among other information. Here's an example:

 


This configuration could be set by entering this value in the TSconfig field of the backend user:

  options.clearCache.all = 1
  TCAdefaults.tt_content {
    hidden = 1
    header = 234
  }

 

Overriding previously set options

Now, lets say the user is a member of a usergroup with this configuration:

  TCAdefaults.tt_content {
    hidden = 1
    header = Hello!
  }

 

Then setting these values in the TSconfig field of the user himself, would override the default value of the header (marked red) and add clear cache option (marked blue). The default value of the hidden field is not changed and simply inherited directly from the group:

  options.clearCache.all = 1
  TCAdefaults.tt_content.header = 234

Setting default User TSconfig

User TSconfig is designed to be individual for users or groups of users. However it can be very handy to set global values that will be initialized for all users.

In extensions this is easily done by the extension API function, t3lib_extMgm::addUserTSConfig(). In the (ext_)localconf.php file you can call it like this to set default configuration:

 

  /**
   * Adding the admin panel to users by default and forcing the display of the edit-icons
   */
  t3lib_extMgm::addUserTSConfig('
  admPanel {
    enable.edit = 1
    module.edit.forceNoPopup = 1
    module.edit.forceDisplayFieldIcons = 1
    module.edit.forceDisplayIcons = 0
    hide = 1
  }
  options.shortcutFrame = 1
  ');

This API function simply adds the content to $TYPO3_CONF_VARS[BE]['defaultUserTSconfig']

To top


Valid XHTML 1.0!