Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

Multiple Extension-Keys #487

Closed artur-grigoryan-cgn closed 2 years ago

artur-grigoryan-cgn commented 2 years ago

Hi, im using two extensions for content elements. Is it possible to add a second path for the JSON-files? Thanks. :)

nhovratov commented 2 years ago

Hey, can you explain a bit more what you are trying to achieve by having two extensions for Mask content elements? How should this work?

artur-grigoryan-cgn commented 2 years ago

Hey, thanks for the quick reply! I try to have the JSON-chunks in two different extensionfolders.

We have an extension "ivs_elements" for default-elements. This is the same in every project. And we have an Extension "ivs_template" with the template and some project-specific elements.

I would like to have the JSON-chunks in:

EXT:ivs_elements/Configuration/Mask/ContentElements and EXT:ivs_template/Configuration/Mask/ContentElements

Is it possible?

nhovratov commented 2 years ago

Hey, it is not possible by default, but you can implement your own Mask Loader.

You can just use the current JsonSplitLoader as a basis and add your own logic to load more json files from another extension. I only see this problem: You somehow need to know what your standard content elements are and what your project specific ones are. There is no distinction for that in the Mask definitions.

artur-grigoryan-cgn commented 2 years ago

I'll try that. I don't need an distinction for that. I just need all them to get loaded. :) I have some more questions:

  1. How can i change the extension-key? If i wan't to get all content elemens to get loaded from:

EXT:ivs_elements/Configuration/Mask/ContentElements and from EXT:ivs_template/Configuration/Mask/ContentElements anymore

  1. Btw. is it planned to create groups for the created elements? So not every element lands in "Mask elements"
nhovratov commented 2 years ago
  1. There is no option to provide a second extension key. So you will have to define it somewhere else or just hard-code it.
  2. Yes, but not anytime soon. Of course sponsoring and pull-requests are welcome.
artur-grigoryan-cgn commented 2 years ago

Thank you for the answer. In 1. i was asking for changing the extension-key. :)

nhovratov commented 2 years ago

Go to LocalConfiguration.php and string replace ivs_template with ivs_elements in the EXTENSIONS => mask section