From the WikiPublisher

Cookbook: Show Attach Links as Footnotes

By default, attach links just show the text of the attach link. Sometimes, we may want to show the URL address of the attachment as well. To do this, create a footnote by adding the following line to local/config.php including the wikipublisher extensions:

   if ($format=='pdf')
      $IMapLinkFmt['Attach:'] .= '<tbook:footnote>$LinkUrl</tbook:footnote';

Note the .= — we want to append the footnote text to the existing default format for the attach markup, which is ‘$LinkText’. We can also make the URL “live” and clickable, by using the following variant:

   if ($format=='pdf')
     $IMapLinkFmt['Attach:'] .= '<tbook:footnote>'.
        "<tbook:url name='\$LinkUrl'>\$LinkUrl</tbook:url>".

The advantage of making the link “live” is that we then get the benefit of the discretionary hyphenation capability for the link text. If the addresses are long, the text will wrap onto the next line at a suitable hyphenation point.

Contributor: John Rankin, Tuesday, 6 November 2007.

Copyright © 2005–2022 the Wikipublisher wiki and its authors

Retrieved from

Page last modified on 22 November 2007 at 09:03 PM