karma4u101/SEO-Friendly-Menu-Params — Issue #1: Alternativ way use dynamic links 
Author: karma4u101
Created: 2011-12-16 08:20:30+00:00
State: open

no menu params stuff just rendering from snippet
[quoting Natfoli G:]
:
//scala
def renderQuery(query: String): NodeSeq=>NodeSeq = //...
//...
val links: Seq[Elem] = queries.map { q =>
SHtml.link(
"/showquery",
() => S.mapSnippet("showQuery", renderQuery(q.query)),
Text(q.name))
)
}

//html

...

This will actually generate a url like /showquery/=_, and Lift will link the GUID to the function that closes over its value of q. Lift runs the function before the page render, which installs your function as the showQuery snippet for the subsequent render. Note that renderQuery is a function that returns a function, but the NodeSeq=>NodeSeq will probably not be written as a function literal but as a css selector expression. So the closure actually runs renderQuery, takes the function it returns, and installs that as the showQuery snippet.

[end quote]