I have a custom macro which may appear multiple times on a single page. As part of the macro rendering, I want to display how the parameters for that particular macro have changed from page version to version.
I can get the page history, but I’m stumbling over how to identify a particular instance of the macro. There are at least two facets to this problem:
- How do I identify which instance of the macro is currently being rendered (i.e. from my macro java code). “
this
” refers to the macro, but I can’t find a macro identifier that is guaranteed constant across page versions. - How can I associate the “currently being rendered” macro ID with a particular instance in the page body history?
I had originally thought to use the “ac:macro-id” attribute in the xhtml, but documentation indicates that it may not be constant from page version to version (due to copying, etc). And I can’t seem to locate that number in the macro class structure from the macro java code anyway.
Any thoughts or guidance are appreciated. Thanks!