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

Randy Brown randy at brownragfilms.com
Tue Jan 12 21:45:39 CST 2016


I’d like to create custom markup to display a link followed by a page text variable of the target page, with the PTV sized slightly smaller. The markup would look like this: [[target|$]] and it would generate this: [[MyPage|My page title]] [-{MyPage$:MyPTV}-]

The PTVLinkText recipe comes closest to doing this, but I haven’t been able to tweek that to produce what I want. In particular, I don’t know how to attach text after the link in the returned value.

# This doesn’t work
 Markup_e('[[|$’, '<[[|',
   "/(?>\\[\\[([^|\\]]+))\\|\\s*\\$\\s*]]/“, 
   "Keep(MakeLink(\$pagename, \$m[1],
     PageVar(\$pagename, '\$Title')
     ),’L’)”.’[-PageTextVar($pagename, MyPTV)-]’.); 

Suggestions? 

Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20160112/94189304/attachment.html>


More information about the pmwiki-devel mailing list