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

Make mask compatible with the bootstrap package #519

Open
linawolf opened this issue Sep 24, 2022 · 5 comments
Open

Make mask compatible with the bootstrap package #519

linawolf opened this issue Sep 24, 2022 · 5 comments

Comments

@linawolf
Copy link
Contributor

The bootstrap package requires it's own DataProcessors and layouts so that things like frame or padding-to-top settings work.

When I use mask I have to do the following steps manually:

Adjust the TypoScript:

# lib.contentElement defined in 
tt_content.mask_logo < lib.contentElement
tt_content.mask_logo {
    templateName = Logo
    dataProcessing.100 = MASK\Mask\DataProcessing\MaskProcessor
}

Move the Template into the path used by bootstrap package, i.e. EXT:my_sitepackage/Ressources/Private/Templates/ContentElements/

Add the layout to the template:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Header"> My Custom Mask Header </f:section>
<f:section name="Main">
    My custom Mask Body
</f:section>
</html>

As the bootstrap backage is wide-spread it would be nice if this worked out-of-the-box

@nhovratov
Copy link
Collaborator

nhovratov commented Sep 25, 2022

I think integrating the bootstrap_package Layout should work the same as for FSC layouts. Check out this guide: https://docs.typo3.org/p/mask/mask/main/en-us/Guides/FluidStyledContent.html
The only difference to your solution is, that you don't override the individual Mask CTypes, but adjust the lib.maskContentElement snippet.

@linawolf
Copy link
Contributor Author

linawolf commented Oct 8, 2022

Unfortunary it does not really work like that as you need special DataProcessors etc for the bootstrap package:

image

@nhovratov
Copy link
Collaborator

Ah ok, I'm not that deep into bootstrap package. When I have some spare time, I will definately have a look into it. But first priority is compatibility with TYPO3 v12 now.

@nhovratov
Copy link
Collaborator

@linawolf
For me this works by adding it to the sitepackage. The static template of the sitepackage must be after the bootstrap package.
The only difference from the guide is the added dataProcessing. No need to move the Templates.

lib.maskContentElement {
    partialRootPaths.0 < lib.contentElement.partialRootPaths.0
    layoutRootPaths.0 < lib.contentElement.layoutRootPaths.0

    dataProcessing < lib.contentElement.dataProcessing
    dataProcessing.100 = MASK\Mask\DataProcessing\MaskProcessor

    settings < lib.contentElement.settings
}

Templates look like this:

<f:layout/>

<f:section name="Header"/>

<f:section name="Main">
    <!-- Mask -->
</f:section>

@pstranghoener
Copy link

@nhovratov Maybe also a good hint for the documentation?

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

No branches or pull requests

3 participants