Ok. Not sure this is a good idea. I'm building a template which passes a JSON config to a Javascript file assembling the template.
For links I need to include some logic how to build them in my JSON config. I would have to call this:
path.href.replace( /.*view=/, "" ) + ".cfm?id="+content.vcard.adresses[1]["iln/gln"]
Which in my config JSON:
<ul data-template="true" data-config='{
"type":"listview",
"link":"path.href.replace( /.*view=/, '' ) + '.cfm?id='+content.vcard.adresses[1]['iln/gln']",
"iconpos":"right"
}'></ul>
Will not work because of quotation-mark-mess, so the JSON is valid, but wrapping it in single quotes messes the HTML up.
Question:
Is there any way to pass this without breaking the HTML? Since it's a template I would like to keep the javascript logic as clean as possible = not put in custom methods for every template instance. So I would like to keep the method call here.
Thanks!