Skip to end of metadata
Go to start of metadata

In confluence, in the title bar, it indicates there's a page attachment and how many attachments to the left of the "Added By". Theme Builder doesn't seem to have a way of implementing this?

I've seen where others have implemented the builder-show / attachments macro combination but I want a simple way of indicating there are attachments on the page like what Confluence natively does.

Is there a way to accomplish this?

  • No labels

3 Comments

  1. The DEFAULT layout contains the following code in the navigation panel:

    {compound-menuitem:pageattachments|flat=true|imginside=true|icon=document_attachment|tooltip=View %page% attachments}
    

    If you wanted this to only display when there are attachments, and additionally display some text then you could use this:

    {builder-show:attachment=}{compound-menuitem:pageattachments|flat=true|tooltip=View %page% attachments|caption=View %page% attachments (%count%)}{builder-show}
    
    1. Unknown User (davidchapmanattpt)

      I missed the COUNT variable in the documentation. Thanks for pointing that out.

      {builder-show:attachment=}{compound-menuitem:pageattachments|flat=true|caption=(%count%)|icon=paperclip}{builder-show}

      worked for my needs.

      1. You might find this page interesting: menulink replacements