Thomas Emil Hansen recently wrote How do I write a user macro with "sections" and "panels" using the 4.0 HTML template?

With Confluence 4, the storage format has changed from traditional wiki markup to an XML based storage format. This means that all those old wiki-markup based user macros are now overdue some TLC. Luckily, there's always the "Insert Wiki Markup" dropdown in the Confluence editor to fall back on.

To convert your macro...

  1. Create a new page and use the "Insert Wiki Markup" function to add your wiki markup:
    
    {section}
    {column}
    $body
    {column}
    {column:width=300px}
    {panel}
    *Contents:*
    {toc:maxLevel=3}
    {panel}
    {column}
    {section}
  2. Save the page
  3. From the Tools menu, select View Storage Format. This will give you:
    
    <ac:macro ac:name="section">
    <ac:rich-text-body>
    <ac:macro ac:name="column">
    <ac:rich-text-body>
    <p>$body</p>
    </ac:rich-text-body>
    </ac:macro>
    <ac:macro ac:name="column">
    <ac:parameter ac:name="width">300px</ac:parameter>
    <ac:rich-text-body>
    <ac:macro ac:name="panel">
    <ac:rich-text-body>
    <p><strong>Contents:</strong></p>
    <ac:macro ac:name="toc">
    <ac:parameter ac:name="maxLevel">3</ac:parameter>
    </ac:macro>
    </ac:rich-text-body>
    </ac:macro>
    </ac:rich-text-body>
    </ac:macro>
    </ac:rich-text-body>
    </ac:macro>
  4. Paste this into your user macro rather than the old-fangled wiki markup.
  5. Repeat this procedure for all user macros you wish to convert.