[pmwiki-devel] MakeLink and Automatic category pages
DaveG
pmwiki at solidgone.com
Mon Jul 7 09:35:07 CDT 2008
I've resolved [1] described below.
Still struggling with [2] -- I'm using beta66.
DaveG wrote:
> *1] MakeLink*
>
> I'm trying to use MakeLink to construct a link that has a parameter.
> Here's what I want (with the encoded parameter):
> <a href="myurl?n=MyCategory.PageName¶m=encoded%20text">text</a>
>
> Here's what I get:
> <a href="myurl?n=MyCategory.PageNameParamEncoded20text">text</a>
>
> Here's what I'm using:
> $text .= MakeLink(
> 'MyCategory/Main',
> 'PageName¶m='.PUE('encoded text'),
> 'text',
> '',
> "<a class='wikilink' href='\$LinkUrl'>\$LinkText</a>"
> );
>
> Two problems above. One is the encoding doesn't seem to work; the other
> is that the parameter is concatenated to the pagename.
I managed to do this by specifying the parameters in the LinkFmt, rather
than the PageName, and using MakePageName:
$text .= MakeLink(
'MyCategory/Main',
'PageName',
'text',
'',
"<a class='wikilink' href='\$LinkUrl"
.'&album='.MakePageName('MyCategory','encoded text')."'>\$LinkText</a>"
);
More information about the pmwiki-devel
mailing list