Details
-
Suggestion
-
Resolution: Duplicate
-
None
-
None
-
None
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
- duplicates
-
CONFSERVER-33293 Autoexport plugin - Method for accessing (relative) url for exported page(s) from template
- Closed
- relates to
-
CONFCLOUD-33292 Autoexport plugin - Method for accessing (relative) url for exported page(s) from template
- Closed