Content inside a UI button does not come up in search results

Nermine Abdulhafiz March 6, 2020

Hello,

We use the UI button macro a lot inside our space pages, ex> for links to our documentation as it give a nice design! There is, however, an issue! The content inside the macro does not come up in search results.

For example..I have different UI buttons titled with our various documentation. When I search for "migration notes" for example, it did not come up at all in the search results, as the content is inside the macro. Even when placed inside double quotations...This is of course a big issue.

This is obviously a bug....I faced the same issue with other macros as well, such as UI tabs, UI expand, etc. Generally, I noticed this issue with all macros that provide good design!

It seems here, we have to choose between "look and feel" and functionality. Obviously, we need to have both: to be able to use all the nice macros without jeopardizing the search functionality.

Any workaround to avoid this issue??

Thanks a lot!

1 answer

1 accepted

1 vote
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 6, 2020

If you're referring to the UI Button macro in Refined Toolkit for Confluence, then yes you're absolutely correct.

The reason that it doesn't work is the way that it's implemented.

Macro parameters do not show up in search, but if the link text was implemented instead as macro body, then that should appear in the search index.

Similarly with the expand macro, to get the link text to appear in the search index, it would likely have to consist of an expand macro enclosing 2 separate nested macros:

  • Expand macro (with no macro parameters, but a body)
    • Expand title macro (with no macro parameters, but a body for the link text)
    • Expand body macro  (with no macro parameters, but a body for content of the hidden expandable text)

While this would be the best approach for finding in the search index, it is without doubt a more clunky solution for when you add content to the page.

I can see why the macros take their approach - as it's easier to use, but does appear to have drawback.

One reason that the nested approach won't work on Confluence Cloud is that nested macros are currently not supported in the new editor (CONFCLOUD-68323) - which appears to be quite a work in progress at the moment.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events