Mask and issues

1.1k Views Asked by At

Regarding the mask, in backend mask have default configurations such as below:

general.json => typo3conf/mask.json
frontend.content => fileadmin/templates/content/
frontend.layouts => fileadmin/templates/content/Layouts/
frontend.partials =>  fileadmin/templates/content/Partials/
backend.backend =>  fileadmin/templates/backend/
backend.layouts_backend => fileadmin/templates/backend/Layouts/
backend.partials_backend => fileadmin/templates/backend/Partials/
backend.preview => fileadmin/templates/preview/

While installing our theme extension, we need to change the above mask configuration option values like below:

general.json => typo3conf/ext/<extension_key>/mask.json
frontend.content => fileadmin/<extension_key>/templates/content/
frontend.layouts => fileadmin/<extension_key>/templates/content/Layouts/
frontend.partials =>  fileadmin/<extension_key>/templates/content/Partials/
backend.backend =>  fileadmin/<extension_key>/templates/backend/
backend.layouts_backend => fileadmin/<extension_key>/templates/backend/Layouts/
backend.partials_backend => fileadmin/<extension_key>/templates/backend/Partials/
backend.preview => fileadmin/<extension_key>/templates/preview/

We tried like below, but its not working:

plugin.tx_mask.general.json = EXT:user_ss4u/mask.json
module.tx_mask.general.json = EXT:user_ss4u/mask.json
1

There are 1 best solutions below

2
On

It seems like you try to override the settings via typoscript, which is - as far as i know - not possible.
The settings you want to change are saved in typo3conf/LocalConfiguration.php in ['EXT']['extConf']['mask'] so there are two (okay, one with two ways) possibilities to change them:

1.1 via Extension Manager
Open the module "Extension" in the TYPO3 Backend and search for the mask Extension.
Click on the configure icon at the end of the row.
Now you should be able to change the settings.

Changes are stored in typo3conf/LocalConfiguration.php

1.2 via Mask itself
Open the module "Mask" in the TYPO3 Backend. Click on the configure icon to change to the Configuration Tab.
Now you should be able to change the settings.

Changes are stored in typo3conf/LocalConfiguration.php

2. via PHP
You can add the following snippet to a file like the ext_localconf.php in typo3conf/ext/<extension_key> or in typo3conf/AdditionalConfiguration.php

$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mask'] = serialize([
    'json' => 'typo3conf/ext/<extension_key>/mask.json',
    'content' => 'fileadmin/<extension_key>/templates/content/',
    'layouts' => 'fileadmin/<extension_key>/templates/content/Layouts/',
    'partials' => 'fileadmin/<extension_key>/templates/content/Partials/',
    'backend' => 'fileadmin/<extension_key>/templates/backend/',
    'layouts_backend' => 'fileadmin/<extension_key>/templates/backend/Layouts/',
    'partials_backend' => 'fileadmin/<extension_key>/templates/backend/Partials/',
    'preview' => 'fileadmin/<extension_key>/templates/preview/',
]);