Page 1 of 1

Template path

Posted: Fri Mar 04, 2005 11:14 pm
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

Posted: Sat Mar 05, 2005 12:41 am
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 ;)

Posted: Sat Mar 05, 2005 9:24 am
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

Posted: Sat Mar 05, 2005 1:22 pm
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

Posted: Sat Mar 05, 2005 1:40 pm
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

Posted: Sat Mar 05, 2005 1:52 pm
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

Posted: Sat Mar 05, 2005 1:58 pm
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: