[support] Views: sort by arbitrary field value
DTH
david at hartster.org
Wed Mar 14 13:07:02 UTC 2012
> From: Ursula Pieper <dramamezzo at gmail.com>
> I think the module you are looking for is nodequeue. You can choose
> which content types to add to a nodequeue, and a view is automatically
> created.
Thanks Ursula; I'd looked at the project page for nodequeue very
briefly, and I had assumed you could only add nodes to it, not entity
bundles like content types. I'll download it and have a further look.
As it stands, for now, I've gone down the route suggested by Joel with
an array containing the content type machine names in the order I
wanted them, a view that took an argument of content type, and then
looped through the array, creating individual views before glueing
them together.
>> On Tue, Mar 13, 2012 at 8:52 AM, Joel Willers <joel.willers at sigler.com>
>> wrote:
>>>
>>> You could do sorting in the .tpl.php, if need be. Also, you could call the
>>> view programmatically, creating an array of sort terms, then filter by the
>>> node type, stepping through a loop of each term.
>>>
>>> Views is quite robust in capabilities, but specific search order isn't as
>>> kind. I suppose you could try something a bit more funky, building a content
>>> type that just has a weight and another content type, then use relationships
>>> to display the view. Or maybe add a weight field to each existing content
>>> type, setting a default to each one, then sorting by weight, like 1 for
>>> news, 2 for blog, 3 for page. Taxonomy could also do some fun stuff with
>>> sorting.
More information about the support
mailing list