Why not use block/render block? <div jwcid="[EMAIL PROTECTED]"> ... login stuff here ... </div>
<div jwcid="[EMAIL PROTECTED]"> ...view stuff here... </div> <div jwcid="[EMAIL PROTECTED]"> ...go stuff here... </div> <div jwcid="@RenderBlock" block="ognl:components[visit.style.topBlockName]"/> <div jwcid="@RenderBlock" block = "ognl:components[visit.style.middleBlockName]"/> <div jwcid="@RenderBlock" block = "ognl:components[visit.style.bottomBlockName]"/> Something along those lines. The blocks don't have to be in the same template file, either: <div jwcid="@RenderBlock" block="ognl:requestCycle.getPage(visit.style.topBlockPageName].components.block"/> And then in the page with the name returned by topBlockPageName, you'd have <div jwcid="[EMAIL PROTECTED]"> ... whatever content goes in here. --- </div> Or, as Todd mentioned, if this is strictly presentational, why not use css to effect the different layouts, and then select the appropriate stylesheet based on the user preferences? Robert Jone.hwk wrote: > Hi, > In my project,I'd like to provide my customers choices to select their > favorite > page templates set on the fly.For example,there are a seires of templates as > following: > [context] > templtes > aaa > login.html > view.html > go.html > ..... > bbb > login.html > view.html > go.html > ..... > ccc > login.html > view.html > go.html > ..... > The visitors can store their selction in "visit",and in class > TemplateSourceImpl I rewrited the "loadTemplate()" to load selected favorite > tempate such as "aaa" or "bbb".There is no problem when first loading,but how > to apply the selected template on the fly is a big problem.I'v look into > source > code,the getTemplate() method invoked only once when loading component. > > Is there a way to go? > thanks in advance > Jone.hwk > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
