Gernott / mask

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

Feature idea: group Mask elements in different tabs of the new content elements wizard #605

Open PaDa19 opened 12 months ago

PaDa19 commented 12 months ago

It would be great if we could have not only one tab "Mask elements" in the new content element wizards but several tabs to group the Mask elements.

At the momenta I overwrite the generateTSConfig fucntion in Classes/CodeGenerator/TyposcriptCodeGenerator.php to sort my content elements into differnt tabs based on prefixes in the element names but it would be great to have this functionality built in.

nhovratov commented 12 months ago

@PaDa19 Hi, thanks for your feature request. You can also do this without overriding the Mask generator. Example:

mod.wizards.newContentElement.wizardItems {
    # Create new custom group
    myOtherGroup {
        header = My other Group
        after = mask
        # Copy config of Mask elements
        elements.mask_element_1 < mod.wizards.newContentElement.wizardItems.mask.elements.mask_element_1
        elements.mask_element_2 < mod.wizards.newContentElement.wizardItems.mask.elements.mask_element_2
        elements.mask_element_3 < mod.wizards.newContentElement.wizardItems.mask.elements.mask_element_3
        # Add to show list
        show = mask_element_1,mask_element_2,mask_element_3
    }

    mask {
        # Override title of the Mask group
        header = My Elements
        before = common
        # Remove all elements, which shouldn't be here.
        elements.mask_element_1 >
        elements.mask_element_2 >
        elements.mask_element_3 >
    }
}

Right now am working on the next generation Content Blocks, so I will not work on new features for Mask at the moment.

PaDa19 commented 12 months ago

Thanks for the quick reply and the suggested solution. I will stick with my approach for the moment because I don't need to change the typoscript when someone adds new elements.

ursbraem commented 11 months ago

Only very loosely related (sorry), but this TSConfig can come in handy:

# Name the tab 
mod.wizards.newContentElement.wizardItems.mask.header = Custom Name
# Put it first
mod.wizards.newContentElement.wizardItems.mask.before = common