[pmwiki-devel] Custom markup to create a link followed by text

Randy Brown randy at brownragfilms.com
Thu Jan 14 15:36:48 CST 2016


Thanks for responding. 

I get the expected result from the following code, but it’s not quite what I want to achieve:

Markup_e('[[|$', '<[[|',
   "/(?>\\[\\[([^|\\]]+))\\|\\s*\\$\\s*]]/", 
   "Keep(MakeLink(\$pagename, \$m[1],
     MyFunction(MakePageName(\$pagename,\$m[1]))
     ),'L')"); 

function MyFunction($pn) {
    $title = PageVar($pn, '$Title');
    return $title.'[-'.PageTextVar($pn,’MyPTV').'-]';
}

Unfortunately, the above makes $:MyPTV and the sounding brackets all appear as link text. I want everything after the $Title to appear as markup AFTER the link.

How would I accomplish that?

Randy


> On Jan 14, 2016, at 12:45 PM, Chuck G <cgpmw13 at codingmaniac.com> wrote:
> 
> Not sure if this is a problem, but I notice that some of your
> quotes and approstophes are oblique versions. You might try
> setting your program editor charset to ascii.
> 




More information about the pmwiki-devel mailing list