Jochen, Richie, Thanks for your responses, and thanks for the reminder that putting logic in templates is a slippery-slope issue where it is easy to slide by degrees into a complicated and unmaintainable mess. On the other hand, since the editMode logic is applied to the rendering of the page via the template I can' think of a workable approach to making the editMode logic more granular that doesn't involve modifications to the templates and, if I have to step out at least that far onto the slippery slope, maybe another step or two won't hurt. I'll let you know.
Lee --- On Wed, 2/16/11, Jochen Fliedner <[email protected]> wrote: > From: Jochen Fliedner <[email protected]> > Subject: RE: [magnolia-user] Access Control More Granular than the Page Level > To: "Magnolia User-List" <[email protected]> > Date: Wednesday, February 16, 2011, 8:41 AM > > > Hi Lee, > > >I am currently looking into doing it all in FreeMarker, > rather than > >modifying the tag library. > > >We are trying, as much as > >possible, to keep the amount of Java code we have to > maintain to a > >minimum by running, when we can, with the modules in > the standard EE > >release. > > I support Richies remarks regarding this. You should not > clutter your ftl-Templating with logic, or you go back to > the ancient JSP-templating world with all its temptations. > In my understanding Magnolia up from 4.x encourages a kind > of MVC-Pattern on the template and paragraph level by Def- > and Model-Classes. You should leverage these as much as > possible to handle logic. Do conditional statements and > iterations (probably using properties of the available > objects) in the ftl at the utmost. > > > >That way the functionality can be installed > >with the package tool which we are planning to use to > move functionality > >between development, test and production. > > Actually the module concept addresses exactly this concern. > Do a templating module including ftl templating, def and > model classes and any configurations to bootstrap and you > can move it anywhere. > > Regards > j > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
