Regarding the several commits I made earlier. It is now possible to use FreeMarker templates to setup the layouts and navigations as well as screens. The goal of these additions is that a web site can be setup with minimal compiling of Java classes and further additions to a site can be made using templates without any further compiling of Java classes (I am only claiming this is a big step in this direction, not that it has been achieved completely). While this will possibly be beneficial in applications its primary target is a website, where the modularization provided by Turbine can be a great asset. In order that url's not be hackable and in general just easier to understand, it is either necessary to have a screen per template (which is okay in an application) or have the template parameter replace the screen parameter in the url. The screen associated with the template must then be specified somehow from the template name. I have done this in FreeMarkerSitePage and the process is described there. It was the screens responsibility to set its Layout, I have shifted this to the template. Where now there is in most cases only one Layout module, FreeMarkerSiteLayout, which provides layout templates with methods to insert the contents of navigations and a screen. The layout template is chosen according to a closest match in path with the screen template; this is also described in FreeMarkerSitePage. So now a template layout directory should somewhat map to the the template screens directory. It is not necessary that all screens directories be specified in the layouts directory. Another possibility I considered for this was to place layouts directly into the screens directory and then a .layout or _layout.html extension would be used to distinguish them from screens. I think this might be an easier interface to a novice user, but I thought some discussion might be good before switching. It would also require some more String manipulation, though I do not think it should be much more than is already being used. BTW if anyone has suggestions on improving the String manipulation being used in FreeMarkerSitePage and FreeMarkerSiteLayout, please respond. I ended up uglying up the code a little bit when trying to integrate my changes with the Screen modules that were already in place. So right now normal Screen modules can be used in conjunction with the template framework I just added. This probably needs cleaned up a bit and I am not sure whether it needs to remain a possibility, comments would be appreciated. It was basically me being in a hurry, so the integration should probably be improved or done away with. I do have some security issues apprehension here. Let me state the changes I have made should not affect the ability to use Screens along with templates in a manner where the Screen specifies the Layout module and a template to use with it. This is just being offered as an alternative. Some more that needs to be done that I can think of right now is specifying the <title> and other elements in the <head> section. I don't think some of this will be a difficult addition, but am a bit unsure of adding large amounts of Javascript. Okay, I hope some will find this valuable, please jump in and improve it. John McNally ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Problems?: [EMAIL PROTECTED]
