I'm implementing Kendo on a site that uses ColdFusion as our server-side language. I'm setting up a template and I have situation where I must use a ColdFusion variable inside the template. For those not familiar w/ ColdFusion, it uses the # to indicate ColdFusion markup - ie. if I wanted the content of a div to be populated from a CF variable, I'd have something like:
<
div
>#cf_variable#</
div
>
In fact, the example above is pretty much exactly what I'm trying to do, just inside a template:
<
script
type
=
"text/x-kendo-template"
id
=
"tile_template"
>
<
div
class
=
"padding list-items-footer k-block"
>
<
button
type
=
"button"
class
=
"btn btn-success"
>
<
i
class
=
"fa-icon-play"
></
i
> <
span
class
=
"hidden-xs"
>##APPLICATION.LC.getValue("LaunchButton")##</
span
>
</
button
>
</
div
>
</
script
>
APPLICATION.LC is our system for multi-lingual text/labels, which is why it's a requirement.
I initially only had single # on each side of the CF variable, but that gave me a javascript error. Adding the second # to each side (which is how you escape the # in CF), stopped the error, but what's actually being rendered in the button is 'APPLICATION.LC.get value("LaunchButton")', instead of the CF-calculated value. Additionally, trying to escape the hashes using \, as suggested in the template help, (ie.\#APPLICATION.LC.getValue("LaunchButton")\#), also doesn't cause a javascript error, but again, only outputs '#APPLICATION.LC.get value("LaunchButton")#'.
I was able to find this thread (http://www.telerik.com/forums/syntax) where it was suggested that the selector could be changed for the Kendo templating system, but no further information was provided on how.
For ease of updating in the future, I'd prefer if we didn't have to change the selector, but I realize it may be inevitable. Any suggestions/guidance that can be provided would be appreciated.