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

Provide a macroId to uniquely identify multiple instances of a macro on a page

XMLWordPrintable

    • 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.

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

      It's often useful to be able to distinguish multiple invocations of a macro on the same page, for instance in JavaScript used by the Macro. So a lot of macros implement some kind of macroId variable that's substituted into the HTML/JavaScript it outputs.

      This is easy enough to implement, but it is duplicated across several plugins, with a variety of different implementations, and you'd be surprised how often people have trouble with it or just get it wrong (e.g., see CONF-12125, which is caused by a user macro that tries to use a random number as the macro id!)

      If the framework passed a macroId to each macro and user macro, it would be a small but useful improvement to the plugin development experience.

              barconati BillA
              tmoore Tim Moore [Atlassian]
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: