[pmwiki-users] Random background image with text over it?
Tegan Dowling
tmdowling at gmail.com
Sun Jul 15 16:33:53 CDT 2007
I've been able to put backgrounds on pages, divs, and table-cells
using instructions from
http://www.pmwiki.org/wiki/Cookbook/BackgroundImages, which allows
fore-ground text-content for the page to be added and edited in the
normal way.
Now I'd like to be able to have the background behind the text change,
randomly selecting from a specified bunch of images, possibly by
showing each image alone on a page, and using
(:pagelist order=random fmt=#include ... :),
and/or
showing each in a [[#anchortagged]] section of a single page, and using
(:include {Groupname/Pagename$RandomSection}:) -- per the recipe at
http://www.pmwiki.org/wiki/Cookbook/RandomQuote
_What I tried_:
I created several pages in group Test, each displaying, in the normal
manner, an image.
And I created a page Test/RandomImage1, and on it put (:pagelist
group=Test order=random count=1 fmt=#include
name=-ImageRotation2,-Template self=0:) to get it to display a page
(and thereby display a picture) from the target collection.
And I created a page Test/RandomImage2, and put on it
--------------------------------------
(:div style='border:4px groove #99f; padding:10px;
background-image:url([=http://www.mysitename.com/Test/ImageRotation1=])':)
Some text here
(:divend:)
--------------------------------------
But it didn't work; I get the border and the text, but not the image.
Thinking maybe this was because the URL given isn't the address of a
.jpg or other image, I even tried to fake that by adding an "fragment
identifier", using
(:...background-image:url([=http://www.mysitename.com/Test/ImageRotation1#file.jpg=])':),
but that didn't work either.
Any ideas for this?
Thanks!
More information about the pmwiki-users
mailing list