Hi,
On Thu, Apr 29, 2010 at 10:47 PM, Mark Mc Mahon <[email protected]> wrote:
> Hi Christian,
>
> Thanks for checking
>
> On Thu, Apr 29, 2010 at 10:12 PM, Christian Boos <[email protected]> wrote:
>
>>
>> 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...
>>
OK - this is going to get a bit long...
I tested some more - and I now understand where the difference in your
results and mine came from.
if you have the following pages: (which is what shows when you use
With the following raw text...
=== default
[[TitleIndex(testhierarchy/)]]
=== default hideprefix
[[TitleIndex(testhierarchy/, hideprefix)]]
=== group
[[TitleIndex(testhierarchy/,format=group)]]
=== group hideprefix
[[TitleIndex(testhierarchy/,format=group, hideprefix)]]
=== hierarchy
[[TitleIndex(testhierarchy/,format=hierarchy)]]
=== hierarchy hideprefix
[[TitleIndex(testhierarchy/,format=hierarchy, hideprefix)]]
The following page is generated (the default with prefix - shows the
pages available)
default ¶
* testhierarchy/page_1/page_a
* testhierarchy/page_1/page_b
* testhierarchy/page_2
* testhierarchy/page_2/page_c
* testhierarchy/page_2/page_d
default hideprefix ¶
* page_1/page_a
* page_1/page_b
* page_2
* page_2/page_c
* page_2/page_d
group ¶
* testhierarchypage_
o 1
+ testhierarchy/page_1/page_a
+ testhierarchy/page_1/page_b
o 2
+ testhierarchy/page_2
+ testhierarchy/page_2/page_c
+ testhierarchy/page_2/page_d
group hideprefix ¶
* page_
o 1
+ testhierarchy/page_1/page_a
+ testhierarchy/page_1/page_b
o 2
+ testhierarchy/page_2
+ testhierarchy/page_2/page_c
+ testhierarchy/page_2/page_d
hierarchy ¶
* testhierarchy
o page_1
+ page_a
+ page_b
o page_2
+ page_2
+ page_c
+ page_d
hierarchy hideprefix ¶
* page_1
o page_a
o page_b
* page_2
o page_2
o page_c
o page_d
In hierarchy you can see "page_2" listed twice. I would suggest that
it should be rendered as:
* page_1 (not linked)
o page_a
o page_b
* page_2 (Linked)
o page_c
o page_d
So would you agree with the following summary:
a) In group/hierarchy formats the prefix specified in TitleIndex
should be displayed as Super/Prefix rather than SuperPrefix
b) In hierarchy format items with children should only be linked if
the page exists
c) In hierarchy format Parents with children should be displayed on
the parent level only (not as one of the children pages, i.e. page_2
in the examples above)
Sound correct? Should we log separate bug(s) for this?
>> 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.
>
> I will check again tomorrow after reverting my changes.
>
> Is it only me or do those list comprehensions with conditional
> branches make anybody elses head hurt?
>
> Is there a preference to keep that code the way it is - or to 'unroll'
> it out to 'normal' loops + If statements? Though my guess is that
> split_in_groups() is the cause of the complications.
>
>>
>> -- Christian
>>
>> --
>
> Thanks
> Mark
>
Thanks
Mark
--
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.