Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12209

Use the new TemplateManager to determine if a template exists as custom displayer

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Currently, to determine if a custom displayer exists for a property, various places are checked (XWiki document in the current wiki, XWiki document in the main wiki and template file).

      However, when determining if a template file exists to be used as a custom displayer, XWiki.evaluateTemplate(...) is used and the result is verified if it is empty.

      With the addition of the TemplateManager (XWIKI-11252), we can now check if a template exists (TemplateManager#getTemplate(...)) without having to render it, so we can avoid a costly and possibly dangerous operation.

        Attachments

          Activity

            People

            • Assignee:
              enygma Eduard Moraru
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: