Forums / Setup & design / How to include tpl code inside javascript

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to include tpl code inside javascript

Author Message

Toms King

Monday 18 September 2006 6:00:24 am

Nabil Alimi

Monday 18 September 2006 6:44:37 am

Hi Toms,

Since your JavaScript code doesn't make use of brackets { }, the {literal}...{/literal} statement is useless.
There's nothing that might be interpreted by EzP parser.
So in order to have what you want work, just add something like :

<img src="tvflash01.jpg" onclick="window.open( {concat( '/site_name/content/view/full' , $Node_id )|ezurl(single)} ,'width=300,height=200')">

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr