Now, i'm not quite sure on the vocabulary around entities and bundles, so apologies, but here's my problem.
I've got lots of content types, and in a view i want to sort nodes first by content type, and then by date
But there is no value on which to sort that makes sense - i want to sort content types into an bespoke order 'Clothes, animals, drinks, people' - i.e. not alphabetical.
I have tried using global php to sort these into a bespoke order - it works fine. i.e.
$myarray=array("films","shoes","people","animals");
This is the set up code and then for every row, views php allows you to sort thusly:
$pos1=array_search($row1->type, $myarray);
$pos2=array_search($row2->type, $myarray);
return $pos1-$pos2;
It works, but I can't combine it with the date sort, and anyway the overhead must be pretty bad.
So, my question is, is there a way that I can add a weighting field to the content types, at what I think might be the bundle level (!?) to allow me to sort my data in views by content type, in a bespoke order (non-alphabetical).
Phew. Any help appreciated.