Hi, I am not sure how easy it will be to write a freemarker template that works in both versions, but something like
[#if (cmsfn!"false")!="false"] <!-- magnolia 4.5 code --> [#else] <!-- magnolia 4.4 code --> [/#if] should allow you to distinguish which templating support objects you have available, which should be more important than the exact magnolia version anyway. (note that I didn't test this code, but something along these lines should work). Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Mike Wilson (via Magnolia Forums) Gesendet: Montag, 14. Jänner 2013 14:22 An: Magnolia User List Betreff: [magnolia-user] test for magnolia version in freemarker template? Can I write Magnolia version specific code in a freemarker template somehow along these lines? : [code] <#if version >= 4.5> <!-- magnolia 4.5 code --> <#else/> <!-- magnolia 4.4 code --> </#if> [/code] Thanks Mike -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=38192552-a5b3-495c-93f8-ca34c30388eb ---------------------------------------------------------------- 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]> ---------------------------------------------------------------- ---------------------------------------------------------------- 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]> ----------------------------------------------------------------
