I would like to know how to change the coding in the html_standard export so that a specific column is sorted on, ie: output would be sorted by artist . At the present, at least in my html_standard output once the html is produced the result is everything all over the place. Thanks in advance
Please have a look at the description of the export scripting.
The sorting criterion is taken from the $loop() statement.
These statement can be nested.
The standard html export loops (sorts) bei %_filename_ext% - you probably want to sort by %artist% - and then you probably want to sort by %album% and then %track%.
So instead of a simple
$loop(%_filename_ext%)
you need
$loop(%artist%)$loop(%album%,1)$loop(%track%)
and instead of a simple
$loopend()
you need
$loopend()$loopend()$loopend()
to close all loops.
Not knowing exactly what I'm doing here but hopefully following your instructions, would this be correct?
$loop(%artist%)$loop(%album%,1)$loop(%year%)$loop(%track%)%loop(%_filename_ext%)
<td$if($odd(%_counter%), class="odd",)>$replace(%title%,&,&)
<td$if($odd(%_counter%), class="odd",)>$replace(%year%,&,&)
<td$if($odd(%_counter%), class="odd",)>$replace(%artist%,&,&)
<td$if($odd(%_counter%), class="odd",)>$replace(%album%,&,&)
<td$if($odd(%_counter%), class="odd",)>$replace(%track%,&,&)
$loopend()$loopend()$loopend()$loopend()$loopend()
I always want somebody to check what I did just to make sure. I don't know after the first
I would say that an awful lot of looping is going on.
As I am not really sure what you want to achieve, I try to translate what your statement means:
First, arrange all artists alphabetically and run through this loop for each entry for artist - I would use $loop(%artist%,1) which sorts the artists but considers each one only once.
The sort the albums by this artist and consider it only once - which is ok, I think.
Now sort by year - which I do not understand: I would sort either by album or by year. I would leave out year altogether. The loop-instruction to sort has nothing to do with the display of the data.
Then you sort by track and get a list of tracks for one year - is that intended?
and finally you sort by filename which should not be noticable as you probably have unique track numbers anyway. So I would leave that out.
The
It is really a pity that you never said what you actually wanted to achieve.
I mean, if you only sort by artist, you get all the tracks from all the albums in a more or less random order. But as you say that it works just fine ...