[pmwiki-users] pagelist and MarkupToHTML function (reposted)

John Rankin john.rankin at affinity.co.nz
Thu Sep 27 21:50:39 CDT 2007


(reposted: no response from the pmwiki-devel list)

I am trying to get pagelist directives working with the 
PublishPDF library and would like some advice. The problem 
is the call to MarkupToHTML in the FPLTemplate function of 
scripts/pagelist.php (running pmwiki version 2.1.27). 

To get things to work, I made the following change to 
function FPLTemplate:
  global $FPLMarkupFunction;
  ...
  SDV($FPLMarkupFunction, 'MarkupToHTML');
  return ... $FPLMarkupFunction($pagename, $out, ...

instead of 
  return ... MarkupToHTML($pagename, $out, ...

When producing a pdf I define a replacement $FPLMarkupFunction 
which calls MarkupToHTML then patches the result. Using the 
PmWiki.FAQ page as a test, this fixes the problem. That
page uses a pagelist to include FAQ text from other pages.
Without the patch, all the text from the included pages
loses its xml tagging, so you get raw, unformatted output.

1. Is the above patch the best solution and if so, could it 
   be added to the core pmwiki please?

2. Is there a better solution I haven't thought of?

3. Are there any side effects of which I may be unaware?

Any advice would be welcome. Without a suitable patch,
pagelists are unusable in combination with PublishPDF.

Thanks
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list