Share » Forums » Developer » adding eZ template language to a...

adding eZ template language to a javascript file

adding eZ template language to a javascript file

Tuesday 11 May 2004 5:03:33 am - 4 replies

Author Message

Olav Lillebø

Tuesday 11 May 2004 5:57:14 am

Not sure if this helps, but maybe try putting the script in a .tpl-file, and from pagelayout use something like

{include uri="design:script.tpl"}

and then, in the script, turn on and off literal to switch between tpl-language and js-language.

{literal}
<script language="JavaScript1.2"><!--
.....
{/literal}
{* Here put template language *}
{literal}
......
{/literal}

Olav..

Rami Grossman

Tuesday 11 May 2004 6:45:36 am

thanks, but it doesn't help.
eZ team know exactly what I mean. I guess they don't have an answer.

<script type="text/javascript" src={"bin/file.js"|ezdesign}></script>
I need this to work and file.js must have eZ template code. it works a lot faster than when I put the javascript inside the html.

Paul Forsyth

Tuesday 11 May 2004 6:50:48 am

For that you need to modify the ez file resource classes to examine other files than .tpls.

Plus you need to actually create an interpreted file, the reason being your html file will still be referencing the js/css file as a file to be imported, therefore it must exist somewhere in the servers path. eZ only creates the html, the server does the rest.

Its a task i see as happening sometime because it *greatly* increases the power of the tempalte system.

paul

--
http://www.visionwt.com

Rami Grossman

Wednesday 12 May 2004 11:30:18 am

thanks! do you know if eZ are going to implement this feature. I thought it is trivial to work till I tried.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu