If I'm not mistaken, S.attr is an attribute on the snippet xml node; for the node currently being processed by bind you use BindHelpers.attr
------------------------------------- Timothy Perrett<timo...@getintheloop.eu> wrote: Jon, To read attributes, you do the following: S.attr("shorten") // => Box[String] Cheers, Tim On Aug 10, 9:44 pm, jon <jonhoff...@gmail.com> wrote: > Hi, > > I have a template with the following > > <lift:Snippit> > <t:name shorten="true" /> > <t:foo form="POST"> > <form:name/> > ... > </t:foo> > </lift:Snippet> > > And a snippet like: > > def doSnippet(x:NodeSeq):NodeSeq = { > bind("t", x, > "name"-> (doName(_)), > "foo" -> (doForm(_)) > ) > > } > > In the code above only the contents of the bound tags are available > for doName and doForm, if I want to be able to read the attribute > "shorten" in doName and have "foo" render with an enclosing <form> > tag, how do I create the bind params? > > I am doing an expensive batch operation upfront, so I want everything > to be in the same snippet. > > Thanks, > > Jon --~--~---------~--~----~------------~-------~--~----~ 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 liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---