It's better when it's simple

User Tools

Site Tools


This is an old revision of the document!

Having an image instead of title text in the upper-right corner

You can see this one in action here:

in tpl/default/main.php change:

        <?tpl_link(wl(),$conf['title'],'name="top" accesskey="h" title="[ALT+H]"')?>


        <?tpl_link(wl(),$conf['logo'],'name="top" accesskey="h" title="[ALT+H]"')?>

and in config/dokuwiki.php add a new variable:

$conf['logo']       = '<img src="media/yourlogo.png" alt="Logo" />';

The additional variable is necessary because otherwise the “<img…>” would be shown in the HTML <title> Tag…

Have fun! peace, Christoph Neuroth 2005-05-08

not working for me…to img src path I had to prepend 'data' dir so it looks like
$conf['logo']       = '<img src="data/media/yourlogo.png" alt="Logo" />';

thanks for the tip, Petr Smrcka 2005-08-24
> For me it had to be src=“_media/logo.png”, maybe due to a newer version?
> DOK 2009-09-02

Thanks for documenting this.
running a closed wiki I needed to use a different kind of url to access the image.
I copied this from the way images are referenced in the body:
It worked at least in CSS.
Anybody knows a nicer way to call fetch w/o hardcoding the wiki dir?
Ferdinand Soethe, 2007-02-03
Here is the alternative to the approach above:
Adding something like
background-image: url(/dokuwiki2/lib/exe/fetch.php?w=&h=&cache=cache&media=yourlogo.png);
to the layout.css will add the logo as a background to the header
Ferdinand Soethe, 2007-02-03
tips/image-in-the-upper-right-corner.1251883975.txt.gz · Last modified: 2009-09-02 11:32 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki