-
Improvement
-
Resolution: Won't Fix
-
Neutral
-
1.4.4
-
-
Yes
-
Empty show more show less
Hi,
Sometimes it would be useful to configure generic parameters into the config for an Area, similar to the current ability to do this at the Paragraph level. Example use case would be able to apply different values to a divClass parameter to populate the class attribute in mainArea.ftl. One template definition could define this value as simply text, while another, (say a News Template that supports the hNews microformat), could define it as text hnews hentry item.
Example mainArea.ftl
[#assign divClass = def.mainArea.parameters.divClass] <div class="${divClass}"> [#include "/templating-kit/templates/global/mainArea.ftl"] </div><!-- end text --> [#-- commenting --] [#if content[def.mainArea.comments.paragraph]?has_content] [@cms.includeTemplate contentNodeName="${def.mainArea.comments.paragraph}" /] [#else] [#if mgnl.editMode] <div style="padding-top: 20px;"> [@cms.newBar contentNodeName="${def.mainArea.comments.paragraph}" paragraph="${def.mainArea.comments.paragraph}" newLabel="${i18n['comments.newLabel']}" /] </div> [/#if] [/#if]
Possible patch is attached. Needs to be tested before applying.
Please let me know if you have any questions.
Cheers,
Matt
Acceptance criteria
- is related to
-
MGNLSTK-575 Add a parameters map to the Site class
- Closed