Costas Stergiou wrote: > > > Screen classes contain a method String getLayout(RunData) which > > determine the Layout module that is used. The default implementation > > Layout module meaning the Layout class?
Yes. > Because, the Layout template > is correctly being used (the one matching the name and directory of the > screen temlate), but the correspondin Layout class is not being used. > > > looks in TR.props. So if you want to set a different Layout you need to > > create a Screen that matches your screen template and return the correct > > Layout from the above mentioned method. > > I do use my own propriatery layout (set in TR.props) but this is the only > layout > class being used. > On the other hand, having to override the getLayout() method for every > screen I am using is really difficult. I would assume you only have a few layouts and the same layout is used for related screens. Put the related screens in a directory structure so that one Screen module is used per Layout. If all your screens are using different Layouts, I am not sure why you are even using layouts at all. > Why Turbine does not locate > and use the Layout class the same way it does with the Layout template? When designing the templating system, I felt that people should not be placing objects in the context for layouts because more than likely that part of the page belonged in a navigation if the contents changed. So only one Layout module would ever be necessary, it placed the tools to render navigations and the screen into the context. This did not turn out to be the case for everyone, but I have yet to need more. The system I described to you predates the template systems and is very flexible. The couple times others have stated they needed different Layout modules, I pointed out this way of achieving it and they were satisfied. Some did not even want the layout template to be governed by the screen template and wanted it per user or something else. The current system allows that. If you are needing Layout modules at all, I assume you would probably have enough Screens already created populating the template contexts, so it should not be a problem. > I have a layout template named /view/Default.vm that is used for a dozen of > templates > that are below the /view directory; but the corresponding view.Default > layout class is > never being used. > Is this correct? do you not have a screens.view.Default.class? if not, why not add one and override the getLayout method? This does not sound like every screen needing a different layout that you described above. john mcnally --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
