Project

Contents

Issue #00005387

New option to define custom css module classes
Feature/Improvement

Until now you could add your own css styles for system provided content modules. What you couldn't do is to define layout variants for existing modules that the author can choose from. This has now been implemented.

To do this you have to provide the following tmlscript module

tmlscript/wga/content-manager/module-css-classes.tmlscript

This script is executed by the content managers (CM-Neo and CM-Classico) to calculate available custom css classes for the current module. The script has to return an object keyed by the module id with an array of available classes.

return{
    cm_tile: ["Blue|blue", "Green|green", "Fade|fade"]  
}

If an author selects one or more of this classes they will be added to the modules root <div> section:

<div class="module module-cm_tile blue fade">...</div>

To define your custom style you have to add it to your projects (s)css code:

.module-cm_tile{
    &.blue{
        > .content{
            background: blue;
        }
    }
}