I have Template and two snippets. Can I get Id in Template for select dynamic snippet.
def remote =
Menu.param[Point]("Test1", "remote",
id => inTransaction(Points.lookup(id)), _.id) / "point" / * / "remote" >>
//inTransaction(Points.lookup(id)) match
// case point.Kind.remote =>
Loc.Template(() => Templates("point" :: "remote" :: Nil).openOr(Nil)) >> Hidden
// case point.Kind.otherremote =>
//Loc.Template(() => Templates("point" :: "otherremote" :: Nil).openOr(Nil)) >> Hidden
You should use
ValueTemplateinstead, it provides the current parsed value is parameter.Code below is untested but you should get the idea: