Web panels can be used to add HTML snippets to parts of a page. They could be used to display additional information on the current wiki page, or JIRA issue etc. See also web panels in the Atlassian documentation.
As a simple example, let’s imagine we want to inform editors of certain Confluence spaces or JIRA projects that the space is to be deprecated, and we’d prefer that they updated a page in another space.
Choose the Show a web panel built-in script, and configure it as follows:
|The weight field is optional, and it only takes positive integers. Lower weights will make the panel be displayed at the top of its section. If blank it will appear at the end of its section.|
For the provider class/script try pasting in the following, either inline or into a file, and pointing to the file:
writer.write("<div style='background-color: yellow; text-align: center'>" + "This space is going to be deprecrated. Please move" + " all content to the DOCS space</div>")
This should appear only on pages in spaces, eg:
|You must write to the provided Writer object, not just return a String.|
Conditions are largely the same as for web item conditions.