Vorschaubildgröße im Template

Hier können Probleme und alles andere in Deutscher Sprache gelöst werden.
Post Reply
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

Vorschaubildgröße im Template

Post by reinhardl »

Hallo,
noch ein Problem bei meinem neuen Template: Wie komme ich im Template an die Variable Vorschaubildgröße aus der Konfiguration?

Grüße
Reinhard
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Vorschaubildgröße im Template

Post by garvinhicking »

Hi!

Die steckt in der Variable $serendipit['thumbSize']. Wird standardmäßig nichtg an smarty durchgereicht, daher musst du mit einer config.inc.php deines templates die erstmal per $serendipity['smarty']->assign durchführen.

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/
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

Re: Vorschaubildgröße im Template

Post by reinhardl »

in config.inc.php steht jetzt:

Code: Select all

$serendipity['smarty']->assign('thumbSize', $serendipity['thumbSize']);
in der tpl Datei kann man jetzt mit

Code: Select all

<img width="{$thumbSize}" ... 
arbeiten.

funktioniert prima - Danke!
Post Reply