Skip to end of metadata
Go to start of metadata

I have discussed this issue with Alain Moran and thought it might be helpful to bring it to the larger community.

We are using pagetree2 in the LSB and for the most part it works great. However, we have a growing discussion forum with 64 entries. The expanded entry for this forum in the LSB runs very long down the page when expanded, i.e. when any forum topic is opened, and isn't very useful. I don't want to remove the tree when displaying a big forum because the tree is still useful for navigating to other pages, especially after one closes down the expanded display for the forum.

Does anyone have any workarounds for this inconvenient display situation?

I don't know what is possible under these circumstances. I have some ideas, all of which may be out of reach. I had thought of a pagination function as in the forum macro. Another possibility would be to set initialDepth=1 for big or otherwise selected forums while all other pages would be set to initialDepth=3. Perhaps one could have a setting that kept selected sections of the hierarchy from being expanded at all.

I suppose I might be asking too much while our users would like me to come up with some improved situation.

  • No labels


  1. Unknown User (gfraser)

    On we've used the builder-hide macro to hide the page tree in forums as follows:

  2. Unknown User (tewolff)


    I implemented what you said as follows:

    {builder-hide:title=Forum - PIUG Discussion|recurse=true}{pagetree2:@home|allowdrag=false|showRoot=true|initialDepth=3}{builder-hide}

    This works ok but isn't going to satisfy people who are used to the LSB navigation for getting around. I opened the Forum and its child pages and the navigation tree was gone as advertised. However, we want the pagetree to still be present and usable to navigate to other pages in the hierarchy. People who have become dependent on the pagetree2 function are going to wonder how to navigate easily to other non-forum pages. In my mind, the solution is to keep the forum hierarchy from expanding but otherwise be fully functional, not making it go away totally when the forum is opened.

  3. Unknown User (tewolff)

    I knew you had to be onto a solution, so I came up with this:

    {builder-hide:title=Forum - PIUG Discussion|recurse=true}{pagetree2:@home|allowdrag=false|showRoot=true|initialDepth=3}{builder-hide}
    {builder-show:title=Forum - PIUG Discussion|recurse=true}{pagetree2:@home|allowdrag=false|showRoot=true|initialDepth=1}{builder-show}

    To my surprise, this works quite adequately. The whole hierarchy opens when I open the Forum, but it closes down when I open any child page in that forum.

    I may have more forums or other pages that grow large. How could I use this strategy to add more than one designated page? If they all start with "Forum", could I use a truncation operator? If they have different names, how would I create a list of alternatives and apply it to the builder statements?

    1. I would use labels:


      If you wish to create more complex logic then you can use nesting to apply AND conditions, and repetition to define OR conditions, eg:

        {builder-hide:title=Forum - PIUG Discussion|recurse=true}{pagetree2:@home|allowdrag=false|showRoot=true|initialDepth=2}{builder-hide}
        {builder-show:title=Forum - PIUG Discussion|recurse=true}{pagetree2:@home|allowdrag=false|showRoot=true|initialDepth=1}{builder-show}

      This would give you an initialDepth of 3 for most pages, those pages with a 'forum' label will use an initialDepth of 2 except for the 'Forum - PIUG Discussion' which will have a depth of 1