book_open Bookmaker for WebOrder
Change book Close bookmaker
Add to book Remove from book
application_side_expand
You can change the order/nesting of topics using drag and drop
application_side_contract

PUBURL -- generate an URL for an attachment

Generate an absolute URL for an attachment, or for a web or topic within the attachment database.

Parameters

Parameter Description Default
"attachment" Name of attachment to link  
web Web  
topic Topic, or Web.Topic  
topic_version Select topic version, if supported most recent
attachment_version Select attachment version, if supported most recent

Examples

  • %PUBURL% expands to https://damask2.mpie.de/pub
  • %PUBURL{"icon_plus.png"}% expands to =%PUBURL{"icon_plus.png"}%
  • %PUBURL{web="System"}% expands to https://damask2.mpie.de/pub/System
  • %PUBURL{topic="System.MainFeatures"}% expands to https://damask2.mpie.de/pub/System/MainFeatures
  • %PUBURL{web="System" topic="MainFeatures"}% expands to https://damask2.mpie.de/pub/System/MainFeatures
  • %PUBURL{topic="System.MainFeatures"}% expands to https://damask2.mpie.de/pub/System/MainFeatures
  • %PUBURL{topic="System.MainFeatures" "icon_plus.png"}% expands to https://damask2.mpie.de/pub/System/MainFeatures/icon_plus.png
  • Also supports topic_version and attachment_version parameters. These can be used with advanced store implementations to select specific attachment versions. However simple file-based stores do not normally support them.
    HELP The 'old' way of building URLs using PUBURL involved concatenating the web and topic names to the PUBURL e.g. %PUBURL%/Main/SystemFeatures. This practice is strongly discouraged, as it does not correctly handle encoding of the parts of the URL. At the first opportunity you should replace all such URLs with the equivalent %PUBURL%{topic="System.MainFeatures"}%, which will handle URL encoding for you.

    IDEA! ATTACHURL provides a shorter way to refer to the attachments on the current topic.

PUBURLPATH, ATTACHURL, ATTACHURLPATH, SCRIPTURL, SCRIPTURLPATH, FileAttachments

This topic: System > Category > UserDocumentationCategory > Macros > VarPUBURL
Topic revision: 03 Feb 2016, UnknownUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback