If you have a template that looks like: <lift:Template.chooseIt> .... stuff here </lift:Template.chooseIt>
In your snippet you can do:
class Template {
def chooseIt(in: NodeSeq): NodeSeq = <lift:surround
with={chooseTemplateName} at="content">{in}</lift:surround>
def chooseTemplateName: String = if (normalTemplate) "default" else
"special_template"
}
On Tue, Jan 12, 2010 at 2:44 PM, Misha Korablin <[email protected]> wrote:
> I'm writing a custom Loc for a page and want to choose a different
> template in <lift:surround> if a certain URL parameter is present. How
> can I do this?
>
> Misha
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<liftweb%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
>
>
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
-- You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
