Hi folks,
I am trying to do binds based on a list of products. The point is to
create links that can be wrapped around existing text or images.
Something like this:
<signup:links.force_PROD>This is the link text our marketing dept.
creates</signup:link>
Here's what I have so far in the snippet related to it:
def links(html:NodeSeq): NodeSeq={
val productBinds:Seq[BindParam] = Product.findActive.flatMap{
prod => List[BindParam] ( TheBindParam( "force_"+prod.product,
SHtml.link("/forced?product="+prod.product, ()=>() , _ ) ) )
}
bind("links" , html, productBinds: _*)
}
Cheers,
Tim
--
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.