[ 
http://jira.magnolia-cms.com/browse/MGNLSTK-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Philipp Bärfuss updated MGNLSTK-780:
------------------------------------

    Fix Version/s: 2.0

> Ability to define parameters on an Area
> ---------------------------------------
>
>                 Key: MGNLSTK-780
>                 URL: http://jira.magnolia-cms.com/browse/MGNLSTK-780
>             Project: Magnolia Standard Templating Kit
>          Issue Type: Improvement
>          Components: templates
>    Affects Versions: 1.4.4
>            Reporter: Matt Dertinger
>            Assignee: Philipp Bärfuss
>             Fix For: 2.0
>
>         Attachments: Area.java.patch
>
>
> 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}}.
> {code:xml|title=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]
> {code}
> Possible patch is attached. Needs to be tested before applying.
> Please let me know if you have any questions.
> Cheers,
> Matt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to