Variable aus index.tpl an js übergeben
Posted: Sat Feb 21, 2009 3:15 pm
Hallo,
ich generiere in meiner index.tpl im header
<script type="text/javascript">
var DOWNGIF =" {$serendipityHTTPPath}templates/{$template}/down.gif";
</script>
<script type="text/javascript" src= "{serendipity_getFile file="menue.js"}"></script>
----------------------
Eine weitere Datei menue.js im Template enthält unter anderem
var ddsmoothmenu={
//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass','/down.gif' , 23], right:['rightarrowclass', '/right.gif']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {enabled:true, offsetx:5, offsety:5},
///////Stop configuring beyond here///////////////////////////
-------------------------------
Die DOWNGIF Variable aus index.tpl soll nun in Menue.js anstelle von '/down.gif' übergeben werden. Ich bin bei js recht unwissend und ein Ersetzen von /down.gif' durch DOWNGIF funktioniert leider nicht.
Weiss jemand rat? - Danke
ich generiere in meiner index.tpl im header
<script type="text/javascript">
var DOWNGIF =" {$serendipityHTTPPath}templates/{$template}/down.gif";
</script>
<script type="text/javascript" src= "{serendipity_getFile file="menue.js"}"></script>
----------------------
Eine weitere Datei menue.js im Template enthält unter anderem
var ddsmoothmenu={
//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass','/down.gif' , 23], right:['rightarrowclass', '/right.gif']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {enabled:true, offsetx:5, offsety:5},
///////Stop configuring beyond here///////////////////////////
-------------------------------
Die DOWNGIF Variable aus index.tpl soll nun in Menue.js anstelle von '/down.gif' übergeben werden. Ich bin bei js recht unwissend und ein Ersetzen von /down.gif' durch DOWNGIF funktioniert leider nicht.
Weiss jemand rat? - Danke