How to insert defined block to javascript?
- dnd
- Member | 16
Hello everybody, I have this code in latte, where I repeatedly insert ROW (defined block) to table.
Everythink works fine here. Now i need to add a new line to the table with this script:
Here is my problem, firebug console shows me this:
I tried to add quotations, but still wrong:
Please, is there any way how to correctly insert defined block as string to javascript (jquery) function's String parameter in latte?
Thanks for any ideas.
===========================
Hi, two hours later there is an update. If I define table row in one line (literaly no breaks/enters), everythink works fine.
Still, is there a way how to use “entered” template block?
Last edited by dnd (2015-07-28 11:24)
- spagr
- Member | 17
Hi,
let's try to use {capture $var}
in this case, instead of {define}
, Context-Aware
Escaping can solve JavaScript variables problem ( but I'm not sure if it can
solve the JavaScript multi-line string too )
Last edited by spagr (2015-07-28 15:32)