[pmwiki-devel] MakeLink and Automatic category pages

DaveG pmwiki at solidgone.com
Sun Jul 6 23:03:06 CDT 2008


I have two questions:

*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&param=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&param='.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.

*2] Automatic page creation*
The pages I'll be referring to don't exist -- I'm using a GroupFooter. 
The link format in the MakeLink above (parameter 5) works to remove the 
'?action=edit', but I still get the text in the page:
"The page "MyCategory.PageName" doesn't exist. ....."

I've tried using:
$AutoCreate['/^Unphotographed\./'] = array('ctime' => $Now, 'text' => 
'test');

But nothing changes, and pages are not created when I visit them. I 
still get the same message "...doesn't exist..." message. I'd like to 
either remove the message for all pages in a specific group, or 
auto-create the  pages.

Thanks for any suggestions,

  ~ ~ Dave



More information about the pmwiki-devel mailing list