Re: [Tiki-users] How sort by multiple fields using Sort Control Block

Jonny Bradley via TikiWiki-users <[email protected]>
Newsgroups gmane.comp.cms.tiki.user
Message-ID <[email protected]>
Hi Alessandro

Ha! Good question, sadly the answer afaik is no, and coincidentally i just (5 minutes ago) shelved the tiny start i had made on adding this which i started in November and just haven't managed to get time to do it... it's quite a challenge i think!

I was thinking the syntax would go more like this:

  {sort mode="tracker_field_macchineTipoMacchina_text_asc,tracker_field_macchineNomeMacchina_asc"}

...but maybe your way is more elegant :p

Add a wish on dev.t.o for it and put me in the "keep informed" field and let's see if anyone else thinks it's a good idea? 

Definitely a missing feature imho ;)

jonny



> On 5 Jan 2021, at 15:09, Alessandro Martinelli <[email protected]> wrote:
> 
> Hi there,
> 
> Is there a way or sorting content by means of "sort" control block sorting by more than one value? for example I'd like to execute a first sorting based on column A value; than, for each column A value, I'd like the content to be further sorted by column B value (hope it'clear).
> 
> My code currently look like this:
> 
> {LIST()}
>   {filter field="tracker_id" content="19"}
>   {sort mode="tracker_field_macchineTipoMacchina_text_asc"}
>   {OUTPUT(template="table")}
>     {column label="Macchina" field="macchina"}
>     {column label="Tipo" field="tipo"}
>   {OUTPUT}
>   {FORMAT(name="tipo")}{display name="tracker_field_macchineTipoMacchina_text"}{FORMAT}
>   {FORMAT(name="macchina")}[Commesse.-.Macchina?itemId={display name="object_id"}|{display name="tracker_field_macchineNomeMacchina"}]{FORMAT}
> {LIST}
> 
> I've tried also in the following way but the result is only the second {sort} is applied.
> 
> {LIST()}
>   {filter field="tracker_id" content="19"}
>   {sort mode="tracker_field_macchineTipoMacchina_text_asc"}
>   {sort mode="tracker_field_macchineNomeMacchina_asc"}
>   {OUTPUT(template="table")}
>     {column label="Macchina" field="macchina"}
>     {column label="Tipo" field="tipo"}
>   {OUTPUT}
>   {FORMAT(name="tipo")}{display name="tracker_field_macchineTipoMacchina_text"}{FORMAT}
>   {FORMAT(name="macchina")}[Commesse.-.Macchina?itemId={display name="object_id"}|{display name="tracker_field_macchineNomeMacchina"}]{FORMAT}
> {LIST}
> 
> Thank you for your time
> 
> Alessandro
> 
> 
> 
> _______________________________________________
> TikiWiki-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.