Hi Folks,
I have a really sticky problem.
I have a content-type called "Coming Event" which has zero or more dates that represent the occurrence of the event. I have a view of these where I want each coming event to appear exactly once in the order of the earliest date in their list. So, let's suppose I have Event A and Event B and they are happening in this order A, B, B, A, B. My view should show me "A B". After the first completion of A, I should see "B A". So this is not a difficult idea.
Any sort that I specify results in one row for each date, so in the case of my example, I see five entries in my view. I should be able to aggregate these rows by some field, but I can't seem to find the magic formula and I get, believe it or not, HTML instead of rendered pages.
I expect there to be a filter problem as some of the dates pass and are filtered out, and I don't know if that will be independent of this question.
Chris.
Hi Chris,
One date filter to allow only results in the future, that you have already, I guess. A sort by date descending. And grouping by the node. You can only group by fields that are configured in the view, but you don’t have to display it.
What’s your base type? The view queries events or dates?
berliner
Am 20.11.2013 um 00:36 schrieb Chris Miller cjm@tryx.org:
Hi Folks,
I have a really sticky problem.
I have a content-type called "Coming Event" which has zero or more dates that represent the occurrence of the event. I have a view of these where I want each coming event to appear exactly once in the order of the earliest date in their list. So, let's suppose I have Event A and Event B and they are happening in this order A, B, B, A, B. My view should show me "A B". After the first completion of A, I should see "B A". So this is not a difficult idea.
Any sort that I specify results in one row for each date, so in the case of my example, I see five entries in my view. I should be able to aggregate these rows by some field, but I can't seem to find the magic formula and I get, believe it or not, HTML instead of rendered pages.
I expect there to be a filter problem as some of the dates pass and are filtered out, and I don't know if that will be independent of this question.
Chris.
[ Drupal support list | http://lists.drupal.org/ ]
Chris,
For showing only 2 items, you can use Distinct Node, which will fetch only distinct results, hence removing any duplicates.
Secondly, for the dates, you will have to add another check, where date is higher than todays or some specified date, I believe this should help you in fetching the desired result.
On Wed, Nov 20, 2013 at 5:06 AM, Chris Miller cjm@tryx.org wrote:
Hi Folks,
I have a really sticky problem.
I have a content-type called "Coming Event" which has zero or more dates that represent the occurrence of the event. I have a view of these where I want each coming event to appear exactly once in the order of the earliest date in their list. So, let's suppose I have Event A and Event B and they are happening in this order A, B, B, A, B. My view should show me "A B". After the first completion of A, I should see "B A". So this is not a difficult idea.
Any sort that I specify results in one row for each date, so in the case of my example, I see five entries in my view. I should be able to aggregate these rows by some field, but I can't seem to find the magic formula and I get, believe it or not, HTML instead of rendered pages.
I expect there to be a filter problem as some of the dates pass and are filtered out, and I don't know if that will be independent of this question.
Chris.
-- [ Drupal support list | http://lists.drupal.org/ ]