[wikka-community] Background Images

Dario Taraborelli dartar
Wed May 12 12:54:34 GMT 2010

...and you can obviously use any other Wikka method in the if statement to check if a page belongs to a given category, is owned by a given user, has specific ACL settings and so on.


On 12 May 2010, at 13:51, Dario Taraborelli wrote:

> hi Kevin
>> I know you can edit the style sheet in order to add a background image but what I need to know is if it is possible to somewhere add a different background image for different pages within the wikka site?
> you can do this by adding a style block in the <head> of the header file of your theme, e.g.
> /plugins/templates/kevin/header.php
> you can then check the page name (if that's what you want to use) to load a different image, for instance:
> <?php 
> if ($this->tag == "MyPage") $imgurl = "mybackground.jpg";
> ?>
> <style type="text/css">
> div#content {
> background-image:url('<?php echo $imgurl ?>');
> }
> </style>
> Hope this helps,
> Dario

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wikkawiki.org/pipermail/community_wikkawiki.org/attachments/20100512/b437818b/attachment.html>

More information about the community mailing list