On 4/29/2010 3:39 PM, Mark Mc Mahon wrote:
Hi,

I was working on the patches that I posted to this ticket but was left
wondering if the TitleIndex macro hierarchy view doesn't need some
more work anyway.


Lets say you have below wiki pages
{{{
Super/Parent/page1/page_A
Super/Parent/page1/page_B
Super/Parent/page2/page_C
Super/Parent/page3/page_D
}}}

and you use the following
{{{ [[TitleIndex(Super/Parent, format=hierarchy)]] }}}

This will show up when rendered as:
{{{
  * SuperParent
     * Page1
        * Page1
        * Page_A
        * Page_B
     * Page2
        * Page2
        * Page_C
        * Page_D
}}}

Shouldn't it show up as:
{{{
  * Parent     # linked or not depending if the page exists
     * Page1         # linked or not depending if the page exists
        * Page_A
        * Page_B
     * Page2
        * Page_C
        * Page_D
}}}

The changes being:
   1. Do not concatenate parent if it has a slash (e.g. SuperParent),
It should actually probably just be Parent, or alternatively
Super/Parent
   2. Don't list Page 1 twice (especially don't list it at the same
level as it's children)
   3. Only linkify existing pages (Page1

Otherwise maybe I have misunderstood how Hierarchy was meant to work?


Strange, I have slightly different results:

[[TitleIndex(Super/Parent, format=hierarchy)]]

  * SuperParent
      * page1
          * page_A
          * page_B
      * page_C
      * page_D

Which is also wrong, but differently.
 - SuperParent need to be '/' separated
 - page1 shouldn't be linkified
 - no page2 and page3...

Besides, in the following:

[[TitleIndex(Super/Parent, hideprefix, format=hierarchy)]]

  * page_A
  * page_B
  * page_C
  * page_D

We also miss page[123].

Definitely worth a second look.

-- Christian

--
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to