Problem/Motivation
Now if you need a specific styling for a section you need to create a "modifier" settings with a css class name. If you need to assign the class only one time in the whole website, the method is too complicated.
Moreover you also could need to assign an ID to a section (useful if you need to create some anchors in the content).
Proposed resolution
Add two fields on the section settings for both Class and ID.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3197768-5.patch | 3.95 KB | rpayanm |
Comments
Comment #2
phjouHello,
I agree that the ID feature would be great. On the other hand, I don't get what is the issue with the modifier.
There is already a "modifier" where you can add custom classes. By default the layouts provided by the module have none but you can edit the config form to add some or you can implement the getModifiersOptions method if you have a custom Layout.
If your class is used only once in the whole website, I guess this class should be directly in your template because this class will show up as a choice everytime someone is building a layout.
Comment #3
finex commentedJust thinking: if the style is needed only one time for a specific layout section in the whole website, and I've the ID field, I can use the ID to style that specific section. Is the style is needed more than once, then the "modifier" way is fine :-)
Having the ID field could be enough :-)
Comment #4
rpayanmHere is the patch to add ID and extra classes to any layout.
Comment #5
rpayanmI added the Id and classes fields inside a details container.
Comment #6
finex commentedIt looks good. Thank you.
Comment #8
phjouThank you for the patch. Commited