DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:image-in-the-upper-right-corner

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: http://deshalbfrei.immermusik.de/

in tpl/default/main.php change:

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

to

        <?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

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:
/dokuwiki2/lib/exe/fetch.php?w=&h=&cache=cache&media=yourlogo.png
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);
background-repeat:no-repeat;
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.1238521598.txt.gz · Last modified: 2009-09-02 11:32 (external edit)

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