Closed (won't fix)
Project:
Domain
Version:
6.x-2.0-rc8
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2009 at 20:40 UTC
Updated:
5 Aug 2011 at 18:28 UTC
I have a view that shows the top 10 stories from (uhhh, let's think of an example site...) fruitsite.com .
Let's say there are 4 stories published to apple.fruitsite.com, 1 to orange.fruitsite.com, and 25 to the main www.fruitsite.com .
If a user is looking at apple.fruitsite.com, I'd like the list to show the 4 apple stories and then fill in the other 6 with stories from the main site. Similarly, a visitor to orange.fruitsite.com would see 1 orange story and 9 general stories.
Is there a way I can sort by current domain? I saw that I can filter by it, but I don't want my list of 10 to turn into a list of 4 (or none!) if there aren't enough stories.
Thanks!
Comments
Comment #1
agentrickardYou can sort by domain, but not by 'is current' first. To do that, use a views attachment.
Comment #2
leenwebb commentedViews attachment? Is this some new thing that I have not heard of before? Or do you mean, "You have to write it yourself"?
Thanks!
Comment #3
agentrickardI mean, Views 2 has 'Attachment' displays, which can be attached to other displays. You would create a View filtered by current domain, and then attach one that filters by 'not current domain'.
Or, you could write a patch that does the sort you want.
Comment #4
leenwebb commentedOoh, interesting. (I am pretty sure I will never learn all of the things that are in Views2...) Thanks for the advice!
Comment #5
agentrickardAttachments are great, but you'd have issues trying to get the count just right.
Marking this as a postponed feature: Allow sorting by 'is_default_domain' -- though I don't know if SQL would support that, we might need an explicit ORDERBY domain_id (4, 0, 1, 2, 3,) etc.
Comment #6
agentrickard