Integrating the Scroll Pagetitle Macro within a custom macro

Comments

5 comments

  • Avatar
    Nils Bier

    Hi Marcel,

    Thanks for getting in touch.

    I just discussed your request internally and unfortunately there's no way to use the Scroll Pagetitle Macro within a user macro, as our macro stores the page title in a content property on the page every time the page is saved, but not when the macro is rendered.

    Right now there's no supported option to include the page title set with our macro (you could try to somehow get the content property "metadata.scroll.pagetitle", but this is not officially supported and it might change in a future version without further notice).

    Best,
    Nils

    1
    Comment actions Permalink
  • Avatar
    Marcel Woschek

    Thanks Nils,

    I tried the workaround you suggested and it works for now.

    Best regards

    Marcel

    0
    Comment actions Permalink
  • Avatar
    Melissa Castillo

    Hello Marcel, 

    I'm also using a custom macro and would like to call the Scroll-Ignore-Macro.  Can you point me in the correction direction?

    I'm pretty new to Confluence and I'm slowing starting to create custom macros.  I created a macro that includes some fields to be supplied by the user and includes a  Button with a drop down that allows to export to word (we have number of different schemas to export). This button is showing up in the export and I wanted to use the Scroll-Ignore Macro in my custom macro to ignore this.  Any suggestions would be great!

    Melissa  

    0
    Comment actions Permalink
  • Avatar
    Marcel Woschek (Edited )

    Hi Melissa,

    to use a macro within your custom macro, you just need to use the xhtml-storage format of the wanted macro.

    You can see the storage format right here:

    The source of the macro should then look like this:

    <ac:structured-macro ac:name="scroll-ignore" ac:schema-version="1"><ac:rich-text-body> <p>Test</p></ac:rich-text-body></ac:structured-macro>

    When your macro in the Editor looks like this:

    So when you copy+paste the storage format of another macro in your custom macro, it should be executed.

    I hope this can help you a little bit :)

    Marcel

    0
    Comment actions Permalink
  • Avatar
    Melissa Castillo

    Thank you so much Marcel!!!

    That was very helpful!!!

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk