[pmwiki-users] First steps in cookbookland

Patrick R. Michaud pmichaud at pobox.com
Tue Jun 27 02:17:17 CDT 2006


On Tue, Jun 27, 2006 at 07:29:53AM +0100, Marc Cooper wrote:
> Marc Cooper said...
> > Now, of course, I need to link to PmWiki pages. Since I am generating 
> > HTML from my script, I'm not clear how I should do this.
> > 
> > Basically I want to do this:
> > 
> >     $out .= '<li><a href="a Group/Page from PmWiki></a>';
> > 
> > I've tried all sorts of permutations of 
> > 
> >     $out .= '<li><a href="$something/Group/Page" >Label</a>';
> > 
> > but I can't see the wood for the trees :-o
> > 
> > Any help would be appreciated. Thanks.
> 
> Can anyone help, please?
> 
> Is the only way to do this to hard-code the URLs?

I think we'd need a little bit more information about your
configuration.  In particular, when the script runs does it
have access to the PmWiki functions, or is it run external to
pmwiki.php?

As a possible answer to your question, note that in

     $out .= '<li><a href="$something/Group/Page" >Label</a>';

the substitution will never take place because the string is
in single quotes instead of double.  You might want instead

     $out .= "<li><a href='$something/Group/Page' >Label</a>";

so that $something is properly substituted.

Pm




More information about the pmwiki-users mailing list