Thanks - that gets me closer. The problem now is that the markup isn’t interpreted.
I literally see "[-my ptv value-]” instead of a smaller font of “my ptv value”. Is there a way to get the text interpreted as markup? Here’s what I’ve got: Markup_e('[[|$', '<[[|', "/(?>\\[\\[([^|\\]]+))\\|\\s*\\$\\s*]]/", "Keep(MakeLink(\$pagename, \$m[1], MyFunction(MakePageName(\$pagename,\$m[1])) ),'L').' [-'.PageTextVar(\$pagename,’MyPTV').'-]'"); function MyFunction ($pn) { $title = PageVar($pn, '$Title'); return $title; } Randy > On Jan 14, 2016, at 3:55 PM, Chuck Goldstein <cgpm...@codingmaniac.com> wrote: > > You probably want to move the $:MyPTV code from your function to outside the > Keep function. > > Chuck G > > > > -------- Original Message -------- > From: Randy Brown <ra...@brownragfilms.com> > Sent: January 14, 2016 3:36:48 PM CST > To: Chuck G <cgpm...@codingmaniac.com> > Cc: pmwiki-devel@pmichaud.com > Subject: Re: [pmwiki-devel] Custom markup to create a link followed by text > > 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 <cgpm...@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. >> > >
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel