Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONFLUENCE-550

Convert Include Content's shared-block and include-shared-block macros to excerpt and excerpt-include

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 9.96.7
    • XML
    • None
    • Unknown

    Description

      The following Macros are not converted :

      • shared-block
      • include-shared-block
      • include-shared-block-inline

      They are currently not converted (kept as confluence_shared-block and confluence_include-shared-block, which no macro provides), so the content of the blocks is not displayed at all, neither on their own page nor where they are included.

       

      The excerpt and excerpt-include macros already targeted by the filter for Confluence's excerpt and excerpt-include support all of this (named excerpts, hidden, inline, no panel).

       

      Proposed conversion:

      shared-block shared-block-key="K"            -> {{excerpt name="K"}}...{{/excerpt}}
      
      shared-block with hidden (any value)         -> {{excerpt name="K" hidden="true"}}...{{/excerpt}}
      
      include-shared-block page=P shared-block-key="K"
      
                                                   -> {{excerpt-include 0="<reference of P>" name="K" nopanel="true"/}}
      
      include-shared-block-inline (same)           -> {{excerpt-include 0="<reference of P>" name="K" nopanel="true" inline="true"/}}
      
      

      nopanel="true" is needed because include-shared-block does not display a panel, while excerpt-include does by default.

      suppress-errors has no equivalent and would be reported with markUnhandledParameterValue.

      allowAnonymousAccess has the same meaning as allowUnprivilegedInclude (the include skips the view right check on the source page);

      as it lowers access control, we suggest reporting it as unhandled and leaving the choice to the administrator.

       

      Known differences:

      • include-shared-block without shared-block-key includes the first shared block of the page, whereas excerpt-include without name includes the unnamed excerpt, or the whole page if there is none. The key of the first block of another page is not known at conversion time; we suggest converting without name and reporting it.
      • A key that is not found renders nothing in Confluence, and an error in XWiki.
      • An empty page parameter would be converted like the empty page link of excerpt-include (0="WebHome").

      Questions:

      1. Is a conversion of these macros already planned or done elsewhere (e.g. in a non-public module)? The Confluence Migrator Pro already converts Multi Excerpt's macros to the same targets (MultiExcerptMacroConverter, MultiExcerptIncludeMacroConverter).
      1. Is a dedicated converter fine with you (e.g. SharedBlockMacroConverter and IncludeSharedBlockMacroConverter), next to the existing excerpt-include conversion?

      We are willing to provide the pull request, with filter tests.

      Attachments

        Activity

          People

            Unassigned Unassigned
            christophe-cn Christophe CN
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: