Review Board 1.5.4

StatefulSnippet.link() function does not take Attribute Parameters

Updated 1 year, 6 months ago

Heiko Seeberger Reviewers
587-hseeberger
587 dchenbecker, dpp, marius, charles, joni, atsuhiko, jorge, naftoli, kris, indrajit, alexb, dlouwers, mstarzyk, rmellgren, jhoffman, probinett, jmadsen, mhartmann, jstrachan, jgoday
None LiftWeb-archive
Taken from ticket #587:

Hi,

i am curious why the StatefulSnippet.link() function does not take any
Attributes as the SHtml.link() function does.

Is there any reason for this?
I would suppose to add the possibility to do so, as seen below:


Currently:


def link(to: String, func: () => Any, body: NodeSeq): Elem = SHtml.link(to, () => {registerThisSnippet(); func()}, body)

Possible Fix:


def link(to: String, func: () => Any, body: NodeSeq, attrs: (String, String)*): Elem = SHtml.link(to, () => {registerThisSnippet(); func()}, body, attrs)

Jan Blankenhorn
Local testing, smoke tested lift-demo.
Ship it!
Posted 1 year, 6 months ago (July 16th, 2010, 3:07 a.m.)
Makes sense. Go for it!