[pmwiki-users] Fwd: Fwd: Passing Variables in a Markup

Stirling Westrup sti at pooq.com
Fri Mar 24 17:16:38 CST 2006

The Editor wrote:
> I'm coming along in my markup--but it's still not working exactly
> right.  In the markup, I want to add an optional pagename parameter to
> determine where users are forwarded to once the script is run.

> Markup('htpasswdform', '<split', '/\\(:membership(\\s+.*?):\\)/ei',
> "HtpasswdForm(\$pagename,\$1)");
> function HtpasswdForm($pagename,$nextpage) {
> Everything seems to work but when I trigger the part of the script
> that uses $nextpage
> ( HandleBrowse($nextpage); ) it just forwards me to a blank page. My
> template is there, but no page, sidebars, headers, etc.

I had a similar problem once. I think the $1 substitution isn't 
happening when you think it is. Try this instead:

Markup('htpasswdform', '<split', '/\\(:membership(\\s+.*?):\\)/ei',

More information about the pmwiki-users mailing list