Template path

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Template path

Post by Roaster »

Hi,

I would like to add an image to the banner. I've managed this at the moment but I'm using a relative path fo the moment.

Code: Select all

...src="{$serendipityBaseURL}templates/myblog/img/top.gif"...
Is there any variable which represents the path to the currently used template? This var should be used in the above code like:

Code: Select all

...src="{$serendipityCurrentlyTemplate}img/top.gif"...
BTW where are those already existing variables documented?

Thx,
Roaster
reion
Regular
Posts: 34
Joined: Mon Feb 28, 2005 10:51 am
Location: Linz
Contact:

Post by reion »

:)

there's a much more elegant way ...

Code: Select all

<img src="{serendipity_getFile file="img/header.jpg"}" />
but such things are in the default-template - just have a look through, and you'll get it, how this all works ;)
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Post by Roaster »

Hi reion,

and where are those useful functions documented?

I mean the example from the default template may be excellent but IMO there are much more of those neatly helpers, right?

cu,
Roaster
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Roaster!

There is some documentation available at http://www.s9y.org/44.html

Volunteers for improving the docs are always wanted :)

Regards,
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/
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Post by Roaster »

Hi garvin,

yes, I know this page, however the function, reion mentioned, is not there.
Volunteers for improving the docs are always wanted
But how should voluteers enhance this documentation if there is no chance to know which function, vars are available?

cu,
Roaster
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

But how should voluteers enhance this documentation if there is no chance to know which function, vars are available?
By looking at existing templates and looking at include/functions_smarty.inc.php :-)

Regards,
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/
Roaster
Regular
Posts: 121
Joined: Tue Feb 22, 2005 9:04 pm

Post by Roaster »

By looking at existing templates and looking at include/functions_smarty.inc.php
Ahhh, that's the information I've waited for :wink:
Post Reply