Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-33291

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

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? 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: