Recent Changes
Recent Changes · Search:
 

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 after 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>".
        '</tbook:footnote>';

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.

« Revision Marks | Cookbook | SVG Image Support »

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