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
Variable aus index.tpl an js übergeben
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Variable aus index.tpl an js übergeben
Hi!
müsste eigentlch klappen!?
Grüße,
Garvin
Code: Select all
arrowimages: {down:['downarrowclass',DOWNGIF , 23], right:['rightarrowclass', DOWNGIF]},
Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Variable aus index.tpl an js übergeben
Funktioniert leider nicht.garvinhicking wrote:Hi!
müsste eigentlch klappen!?Code: Select all
arrowimages: {down:['downarrowclass',DOWNGIF , 23], right:['rightarrowclass', DOWNGIF]},
Grüße,
Garvin
Da ja einige gerne den Code für das Drop Down haben möchten findet ihr hier das fast fertige Template:
http://www.plus9.de/uploads/plus9.zip
Wie gesagt besteht darin noch obiges Problem.
Nachtrag: Wenn Static Pages im Menue angezeigt werden sollen muss die Datei serendipity_plugin_staticpage.php im Plugin Verzeichnis Zeile ca 251 wie folgt geändert werden:
foreach($pagelist as $page) {
$content .= (!empty($page['permalink'])
? sprintf(
"<li> <a href=\"%s\" >%s</a></li>\n",
$page['permalink'],
htmlspecialchars($page['pagetitle']),
$page['depth']*10,
(!empty($page['headline']) ? htmlspecialchars($page['headline']) : htmlspecialchars($page['pagetitle'])))