Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5435

Table Of Contents Macro does not work inside a XWiki Macro or as a content of one

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.5 M1
    • 2.3.2
    • None
    • JBoss 4.2.3.GA on Ubuntu 10.04 LTS
    • toc, macro
    • Unit
    • Unknown

    Description

      When I try to use the toc in a new custom XWiki Macro the Header does not show up.

      Example 1 (Inside a custom Macro)

      In the macro code named "custommacro":

      {{box cssClass="floatinginfobox" title="**Table of Contents**"}}
        {{toc depth="3"/}}
      {{/box}}
      

      Then in the page a use:

      {{custommacro/}}
      

      But only the box shows up.

      Example 2 (As a content of a custom Macro)

      In the macro code named "custommacro2":

      {{velocity}}
        {{box cssClass="floatinginfobox" title="**Table of Contents**"}}
          $context.macro.content
        {{/box}}
      {{/velocity}}
      

      Then in the page I use:

      {{custommacro2}}
        {{toc depth="3"/}}
      {{/custommacro2}}
      

      But only the box shows up

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            lmserique Luiz Marcelo Serique
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: