[All Adaptavist Apps]

Page tree

Hey,

I'm having difficulty with the Pagetree2 macro. In my LSB I am just using pagetree2 macro but the order of my pages is no longer alphabetical. We just upgraded from Confluence 2.9 to 3.2 so there has been a big change with that, but any ideas on how to fix the pagetree display? Thanks.

  • No labels

9 Comments

  1. Unknown User (amoran)

    In later releases builder defaults to using confluence page position sorting, you probably want to switch it back to the original 'natural' sort using sort=natural

    1. Unknown User (colin)

      Hey Alain,

      I tried that with: pagetree2:sort=natural but it still shows up as mixed up. For example, in the Left Side Bar the pagetree shows up as:
      -Social Media
      -Activity Logs
      -Activity Protocol
      etc.

      Meaning it is alphabetized besides the first page. Any ideas on ways to correct this?

  2. Unknown User (tewolff)

    I'm so glad you brought up this issue, Colin. I have the same situation and hadn't gotten around to asking the question. I'm using Confluence 3.1.2 and TB 4.0.2. Here's my LSB code:

       {pagetree2:@home|sort=natural|allowdrag=false|showRoot=true|initialDepth=3}
    

    The sort order is definitely not alphabetical at the top level or lower levels. I can't figure out what is the basis for the order. Help please, Alain.

    Tom

  3. Unknown User (amoran)

    I'm not sure how you are creating this issue :s

    {pagetree2:@space|sort=natural|initialDepth=1}

    Unable to render content due to system error: java.lang.ClassCastException: class com.adaptavist.confluence.theme.engine.macros.deprecated.Pagetree2Macro cannot be cast to class com.atlassian.renderer.v2.macro.Macro (com.adaptavist.confluence.theme.engine.macros.deprecated.Pagetree2Macro is in unnamed module of loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @18e73a76; com.atlassian.renderer.v2.macro.Macro is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @4263b080)

    OK, so I just tried a bunch of alternatives and still cant persuade it to happen (added initialDepth=1 to stop the page scrolling so much)

    1. Unknown User (tewolff)

      Here is more of the code:

      h3. Navigation
         {builder-hide:title=Forum - PIUG DF|recurse=true}{pagetree2:@home|sort=natural|allowdrag=false|showRoot=true|initialDepth=3}{builder-hide}
         {builder-show:title=Forum - PIUG DF|recurse=true}{pagetree2:@home|sort=natural|allowdrag=false|showRoot=true|initialDepth=1}{builder-show}
      

      I shouldn't have to copy the resulting navigation table here because you can see the resulting sort order on http://wiki.piug.org/ (no login needed). It looks like there are two segments, each sorted "normally." You can see the same behavior if you expand "Forum - PIUG DF" although only the first two entries seem out of place. Most of the other expanded levels seem to look ok.

      1. Unknown User (amoran)

        By the looks of this page, you have manually sorted them by drag/dropping them in the listpages-dirview: http://wiki.piug.org/pages/listpages-dirview.action?key=PIUG&openId=1704094#selectedPageInHierarchy

        1. Unknown User (tewolff)

          Alain:

          Mystery solved. Now I understand that we can affect the "natural" order. I didn't realize that at all. I'm glad for you that it wasn't a TB coding error. Thanks for the explanation.

          Tom

        2. Unknown User (colin)

          Thanks Alain, I believe I simply altered the natural order as well. A funny little mistake that was highly irritating.

        3. Unknown User (tewolff)

          Alain:

          Now that you have explained that I must have manually sorted the items, how do I revert the order to "natural"? In other words, I don't want any previous manual sorting to be in effect. If I just manually resort them, then new entries presumably will go to the bottom, and I want "natural" order for all from now on. Thanks.

          Tom