Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33297

Autoexport - method for accessing (relative) url for exported page(s) from template

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • None
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      if you are trying to write a template for use with the AutoExport plugin, and you need access to the exported URL of an arbitrary AbstractPage (ie: the current page, or any of it's children) for any reason (in my current situation: to pass as a query param in an ifram for an external service) there is no way to do this (from the template):
      $page.urlPath (java: AbstractPage.getUrlPath()) is the pre-exported path in confluence
      $autoexport.link($page) (java: ExportUtils.link(AbstractPage)) generates an <a href=""/> for the page, still using the pre-exported path
      ExportBeautifier will look for html nodes with "href" and "src" attributes and convert the paths, but it won't look for paths in arbitrary text (ie: script bodies, escaped in iframe params, etc...)
      It would be helpful if some object was made available in the VelocityContext that had a simple method for retrieving the final exported (relative) url of an arbitrary AbstractPage as a String, which could then be included in the response as is (or if necessary for passing as an argument in some other url, escaped using $generalUtil.urlEncode())

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shaffenden Steve Haffenden (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: