Unless I'm missing something LiftRules.addTemplateBefore should
suffice. Lift (see findVisibleTemplate which is called before
processSurroundAndInclude) will look for your template so your Pf can
return it virtually from anywhere.

Br's,
Marius

On Dec 4, 10:10 pm, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote:
> Ahh. What would make this really simple is if LiftRules.finder was a PF
> instead of a straight def, since LiftRules.finder is what actually tries to
> locate the template using ClassLoader.getResourceAsStream currently. In the
> meantime, you might have luck with LiftRules.liftTagProcessing. You can
> define your own PF that handles surround specially. In particular, I'd look
> at processSurroundElement (and the related findAndMerge and processBind) in
> LiftSession.scala.
>
> Derek
>
> On Thu, Dec 4, 2008 at 1:27 PM, Tim Perrett <[EMAIL PROTECTED]> wrote:
>
> > I am indeed talking about lift:surround :)
>
> > I see processSurroundAndInclude and what it does, but what i really
> > want to do it set the content of the surround dynamically (from a
> > layout i'll store in the DB)
>
> > How would one go about doing this?
>
> > Cheers
>
> > Tim
>
> > On Dec 4, 7:01 pm, "Derek Chen-Becker" <[EMAIL PROTECTED]> wrote:
> > > Are you talking about <lift:surround/> tags? Those are handled in
> > > LiftSession.processSurroundAndInclude, line 697. Here's some example code
> > > for a utility method from an old app that uses it in some DispatchPFs I
> > was
> > > running:
>
> > >   def process (xhtml : NodeSeq) : XmlResponse = {
> > >     val data = <lift:surround with="default"
> > > at="content">{xhtml}</lift:surround>
> > >     XmlResponse(<html>{
> > > S.session.open_!.processSurroundAndInclude(S.uri,data)}</html>)
> > >   }
>
> > > Derek
>
> > > On Thu, Dec 4, 2008 at 12:50 PM, Tim Perrett <[EMAIL PROTECTED]>
> > wrote:
>
> > > > Hey guys,
>
> > > > Within lift, I cant seem to find where the content returned from
> > > > whatever template mech then gets bound to the layout content?
>
> > > > Can someone point me in the right direction?
>
> > > > Cheers
>
> > > > Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to