[pmwiki-users] RandomQuote without the anchor?

Andy Kaplan-Myrth andy at kaplan-myrth.ca
Sat Sep 13 00:27:04 CDT 2008


I have a question about generating random *colours* -- I'm sure it's not 
too difficult, but any help would be appreciated!

I'm trying to create a "grid" view for my blog, sort of like 
yongfook.com, as an example. What I have so far is at 

I did this the same way I generate my regular blog view -- a pagelist 
that gives each blog post a style, and in this case that style creates 
small floating boxes. The layout works. Now I'd like to give each box a 
different background color.

I found the RandomQuote cookbook and thought I could use it, and I 
created a page with a listing of my favourite background colours, but 
when I include them in the pagelist template they come out with the 
anchors from the list of colours, so they mess up the >>div code<<

Does anybody have a solution or a suggestion for how to change the 
RandomQuote cookbook so it will only return a colour? I think this 
should be an easy change to the cookbook, especially because all of my 
colours are the same number of characters (3: #ffc, #fdc, things like 
that), but I can't understand the regexp etc. in the cookbook!


Andy Kaplan-Myrth, M.A., LL.B.
Barrister & Solicitor
email: andy at kaplan-myrth.ca
web: http://kaplan-myrth.ca
microblog: http://identi.ca/kaplanmyrth
friendfeed: http://friendfeed.com/kaplanmyrth

More information about the pmwiki-users mailing list