JP Theberge | 5 Jul 03:40

a little question about wiliki

I hope it is the right place to ask.

Is there a way to get the name of the current page from within a virtual page?

for example if I call the page wiliki.cgi?p=RSS_myblog

I want to be able to use the string "myblog" from within 

(define-virtual-page (#/^RSS_/ (_))
...

Any help will be greatly appreciated!

--
JP Theberge

      Offrez un compte Flickr Pro à vos amis et à votre famille.
http://www.flickr.com/gift/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
Shiro Kawai | 6 Jul 01:01

Re: a little question about wiliki

From: JP Theberge <yes0d <at> yahoo.fr>
Subject: [Gauche-devel] a little question about wiliki
Date: Sat, 5 Jul 2008 01:43:02 +0000 (GMT)

> I hope it is the right place to ask.

Yes, you can ask it here.

> Is there a way to get the name of the current page from within a virtual page?
> 
> for example if I call the page wiliki.cgi?p=RSS_myblog
> 
> I want to be able to use the string "myblog" from within 
> 
> (define-virtual-page (#/^RSS_/ (_))
> ...

I already forgot what I was intended in the API, but as far as
I can figure out from the source, the list after the regexp is
a list of variables that receives the (sub)matches of the actual
page name.  So, try

  (define-virtual-page (#/^RSS_.*/ (name))
    <body> ...)

and the variable 'name' will be bound to the entire match,
which should be the given name, or

  (define-virtual-page (#/^RSS_(.*)/ (name subname))
    <body> ...)
(Continue reading)


Gmane