Item8501: Strange sorting with FilterPlugin
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
What are the dependencies, that the following code renders correctly?
%MAKEINDEX{"Anlage;Anlage, Anlage (Beschreibung);AnlageBescreibung, Anlage (Handbuch);AnlageHandbuch" cols="2" split="," header="Demo" pattern="(.*);(.*)" format="[[$2][$1]]"}%
Demo
A
[[][Anlage]]
B
[[][Anlage (Beschreibung)]]
H
[[][Anlage (Handbuch)]]
Why am I asking? So, on our installation the list looks as following:
--
AndreLichtsteiner - 11 Feb 2010
Not a bug. The brackets are used to mark the substring to sort the index. Add explicit brackets to fix accidental sorting when the first element might have brackets for some reason.
Try
%MAKEINDEX{
"Anlage;(Anlag), AnlageBescreibung;(Anlage (Beschreibung)), AnlageHandbuch;(Anlage (Handbuch))"
cols="2"
split=","
header="Demo"
pattern="(.*);(.*)"
format="[[$1][$2]]"
}%
Best practice is to make the first group
$1
the topic name by default and then pick the sortable string using brackets.
--
MichaelDaum - 12 Feb 2010
Thanks for the answer. But on our wiki, the brackets remain in the title. Shouldn't the
pattern
look like following?
pattern="(.*);\((.*)\)"
Wouldn't it be easier to offer a parameter disabling the some what obscure function of 'brackets/substring order'?
--
AndreLichtsteiner - 16 Feb 2010