<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 07:28:23 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MGNLSTK-577] Make it configurable what classes are included in the freemarker template rendering context</title>
                <link>https://jira.magnolia-cms.com/browse/MGNLSTK-577</link>
                <project id="10287" key="MGNLSTK">Magnolia Standard Templating Kit (closed)</project>
                    <description>&lt;p&gt;It would be nice to be able to register classes under the template-renderer en paragraph-renderer configurations, so that those classes would be added to the template rendering context. &lt;/p&gt;

&lt;p&gt;STKTemplateRenderer could get a Map property like &apos;classesToInclude&apos;&lt;br/&gt;
it would be nice if modules/standard-templating-kit/template-renderers/stk would be watched, and new classes would be added on the fly through content2bean.  STKTemplateRenderer would have to propagate this map to FreemarkerHelper&lt;/p&gt;

&lt;p&gt;you could do something like this in FreemarkerHelper:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;TemplateHashModel staticModels = wrapper.getStaticModels();
        &lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt; {
            &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; name : classesToInclude.keySet()) {
                TemplateHashModel model = (TemplateHashModel) staticModels.get(classesToInclude.get(name));
                map.put(name, model);
            }
        } &lt;span class=&quot;code-keyword&quot;&gt;catch&lt;/span&gt; (TemplateModelException e) {
            e.printStackTrace();
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;That way all static methods of the class are available. &lt;/p&gt;</description>
                <environment></environment>
        <key id="17795">MGNLSTK-577</key>
            <summary>Make it configurable what classes are included in the freemarker template rendering context</summary>
                <type id="4" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10890&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="gjoseph">Magnolia International</assignee>
                                    <reporter username="ebunders">Ernst Bunders</reporter>
                        <labels>
                            <label>freemarker</label>
                            <label>vpro</label>
                    </labels>
                <created>Wed, 3 Feb 2010 15:58:04 +0100</created>
                <updated>Wed, 23 Jan 2013 08:53:21 +0100</updated>
                            <resolved>Fri, 19 Mar 2010 17:12:55 +0100</resolved>
                                    <version>1.2.3</version>
                                    <fixVersion>1.3</fixVersion>
                                    <component>templates</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="26345" author="pbaerfuss" created="Thu, 4 Feb 2010 09:20:04 +0100"  >&lt;p&gt;Nice idea indeed. Today you have to options to achieve the same effect:&lt;/p&gt;

&lt;p&gt;a) use the model as a provider for util classes: model.myutil&lt;/p&gt;

&lt;p&gt;b) extend the renderer (STKTemplateRenderer for instance) and override the setupContext method&lt;/p&gt;</comment>
                            <comment id="26480" author="gjoseph" created="Fri, 12 Feb 2010 00:15:07 +0100"  >&lt;p&gt;I think this belongs to the main MAGNOLIA project, and can be solved with several, non-contradicting, approaches:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;for Freemarker-specific objects/classes: &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-1469&quot; title=&quot;Make Freemarker more configurable through admininterface&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-1469&quot;&gt;&lt;del&gt;MAGNOLIA-1469&lt;/del&gt;&lt;/a&gt; - first need to cleanup the templateLoader configuration (there&apos;s an ugly knot to untie there, which was a workaround until &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-2553&quot; title=&quot;FactoryUtil: should return a proxy object for observed objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-2553&quot;&gt;&lt;del&gt;MAGNOLIA-2553&lt;/del&gt;&lt;/a&gt;) - we&apos;ll possibly do this for &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-2993&quot; title=&quot;Extract logic out of taglibs - reusability, testability, ...&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-2993&quot;&gt;&lt;del&gt;MAGNOLIA-2993&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;for objects that should be available to all templating engines: something could also be configured in &lt;tt&gt;/server/rendering&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;configure renderers via content2bean: &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-2383&quot; title=&quot;TemplateRenderer should be instantiated using content2bean&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-2383&quot;&gt;&lt;del&gt;MAGNOLIA-2383&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;For 2) and 3) we&apos;ll need some for of factory/provider interface and implementations, since these objects need to be re-instanciated per request.&lt;/p&gt;</comment>
                            <comment id="26582" author="gjoseph" created="Wed, 17 Feb 2010 03:10:31 +0100"  >&lt;p&gt;Ernst,&lt;/p&gt;

&lt;p&gt;I don&apos;t know the internals of FreeMarker&apos;s staticModels feature, but since &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-3087&quot; title=&quot;Allow configuration of shared variables for FreeMarker&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-3087&quot;&gt;&lt;del&gt;MAGNOLIA-3087&lt;/del&gt;&lt;/a&gt;, this is also possible by registering a &lt;tt&gt;sharedVariable&lt;/tt&gt; in the FreeMarker configuration. (&lt;tt&gt;/server/rendering/freemarker/sharedVariables&lt;/tt&gt;) The only condition being that your utility class must be instantiatable (via Content2Bean/ClassFactory, i.e must be concrete and have an accessible constructor).&lt;/p&gt;

&lt;p&gt;Validated with a test: see &lt;tt&gt;info.magnolia.freemarker.FreemarkerHelperTest#testCanAccessStaticMethodsOfSharedVariables&lt;/tt&gt; (in magnolia-core)&lt;/p&gt;

&lt;p&gt;Please let me know if this would work you.&lt;/p&gt;

&lt;p&gt;To all: regarding my point (2) above - do we want this available for all templating engines - or do we want to keep it implementation-dependent? I guess for JSP, we could push these variables to the ServletContext (which has a similar lifecycle than the Freemarker &lt;tt&gt;Configuration&lt;/tt&gt; object at the moment), but this would somehow pollute the namespace (as other things end up in this context, unrelated to rendering)&lt;/p&gt;</comment>
                            <comment id="26632" author="ebunders" created="Thu, 18 Feb 2010 15:27:20 +0100"  >&lt;p&gt;So you can create properties under &apos;sharedVariables&apos; that map a class to a name, so an instance of the class is put in the rendering context under &apos;name&apos;? That sounds fine by me.&lt;/p&gt;

&lt;p&gt;i must admit i find server/rendering/freemarker/sharedVariables a bit strange as a location to configure this, as it seems to be a behavior of the renderer class, so i wonder how many people will find it there (perhaps it should be a good idea to mention this feature in the magnolia freemarker primer), lest it will not be a &apos;hidden feature&apos;, as it was to me.&lt;/p&gt;

&lt;p&gt;But thanks anyway for the follow up.&lt;/p&gt;

&lt;p&gt;regards,&lt;/p&gt;</comment>
                            <comment id="26633" author="gjoseph" created="Thu, 18 Feb 2010 15:36:31 +0100"  >&lt;p&gt;Sure, it will documented (it&apos;s just brand new) - it&apos;s configured in this location, because it&apos;s part of the FreeMarker configuration (i.e these variables are available system-wide to anything that uses FreeMarker, not just template and paragraph renderers)&lt;/p&gt;

&lt;p&gt;If you want to try this out, grab the 4.3-m2 jars &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="26649" author="ebunders" created="Fri, 19 Feb 2010 12:48:53 +0100"  >&lt;p&gt;Ah, just new. That&apos;s good. But from a multi-site perspective, is it desirable to configure this stuff globally? Wouldn&apos;t it make more sense to be able to configure this for each site? (of course my solution doesn&apos;t allow for that either). I guess that there are quite a few things you would like to be able to do on the site level, when you think about it...&lt;/p&gt;

&lt;p&gt;Never the less, that is no big deal, and it seems like a fine solution to me. &lt;br/&gt;
Thanks,&lt;/p&gt;</comment>
                            <comment id="26672" author="gjoseph" created="Fri, 19 Feb 2010 15:50:01 +0100"  >&lt;p&gt;True, but that&apos;s the case for each and every piece of configuration; we&apos;ll have to come up with a generic solution at some point; meantime, when this is really needed, use a different instance &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
(although i&apos;d assume you have different templates for these site-specific things, so you could just register those objects with different names. Or make those sharedVariable objects site-aware)&lt;/p&gt;</comment>
                            <comment id="27495" author="gjoseph" created="Fri, 19 Mar 2010 17:12:55 +0100"  >&lt;p&gt;Solved by &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-3087&quot; title=&quot;Allow configuration of shared variables for FreeMarker&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-3087&quot;&gt;&lt;del&gt;MAGNOLIA-3087&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;shareVariables can hold objects that have static-only methods or not. These objects should be stateless, since rendering can be used simultaneously by several threads.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>relation</name>
                                            <outwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="12676">MAGNOLIA-1469</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15254">MAGNOLIA-2383</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="17872">MAGNOLIA-3087</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>vpro.nl</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 4 Feb 2010 09:20:04 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 49 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ebunders</customfieldvalue>
            <customfieldvalue>gjoseph</customfieldvalue>
            <customfieldvalue>pbaerfuss</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0442n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>24102</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>