Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PaDa19 opened this issue Nov 24, 2023 · 3 comments

Comments

@PaDa19
Copy link

PaDa19 commented Nov 24, 2023

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
Copy link
Collaborator

@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
Copy link
Author

PaDa19 commented Nov 24, 2023

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
Copy link
Contributor

ursbraem commented Dec 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants