By Aleet on
I have a view listing a series of meetings that occur throughout the week: http://aasg.info/list
Each meeting has been categorized to occur on a given day of the week. Some have taxonomy/term "monday" .Some others have taxonomy/term "tuesday"
How do i get the view to group the fields by day of the week they belong to and sort them accordingly? like this:
Sunday
--Meeting
--Meeting
Monday
--Meeting
--Meeting
Tuesday
--Meeting
--Meeting
My final goal is this: http://aasg.info/meeting_list_project but I just got started with views and asking basic questions as I figure it out.
Comments
couple ideas
One method would be to add an argument for your vocabulary that is holding the weekday terms. Then, if you then put the page for the view at: "/meetings" the list for each weekday would be at "/meetings/monday", "/meetings/tuesday", "/meetings/wednesday" and so on.
If you wanted them all listed on one page similar to the image you provided, another possible method would be to set up individual views for each weekday, then either use php views snippets or the insert_view module to display the views on a page node.
Need a snippet
There isn't an option to do a GROUP BY (of sorts) in Views so you'll need this: http://drupal.org/node/42603
You'll want to sort by day of the week, then time of meeting, then use the above snippet.
--
Rob
Founder and Director
Electronic Insight Corporation
Recent Drupal Projects: MP3PIG | MySpace Layouts
There is no option for sort by day of week or time of meeting
Thanks for your reply. The snippet you suggest sounds like just what I need and you also opened my eyes to an entire section of handbood I had missed till now.
See my screenshot here: http://aasg.info/images/sort.gif
Views is not giving me an option to sort by any of the taxonomies i have. What am I doing wrong?
cc
cc
Taxonomy: Term Name
To sort, you would choose Taxonomy: Term Name. That should sort them by the order of the Terms in that Taxonomy (use weights to get the correct order). I think that should do it, but I'm just speculating and it might need more tweaking.
Also, choose Taxonomy: Term as a field and make sure you put XYZZY (or whatever is in your snippet code) as the Label for that field.
You might need to extend whatever modules you are using to let Views know how to sort by other criteria.
Let me know if you need more help.
--
Rob
Founder and Director
Electronic Insight Corporation
Recent Drupal Projects: MP3PIG | MySpace Layouts
Nodes appear multiple times.
Thank you. It worked beautifully and now I understand the logic behind it.
But just as the Views User Documentation predicts http://drupal.org/node/54448 nodes in my view list are appearing multiple times becasue they are associated with multiple terms.
http://aasg.info/list
Any way to correct that?
Node: Distinct
Choose Node: Distinct under Filters.
--
Rob
Founder and Director
Electronic Insight Corporation
Recent Drupal Projects: MP3PIG | MySpace Layouts
Didn't fix it.
I put in Node: Distinct under Filters. But still getting repeats.
The view is here: http://aasg.info/list
Screenshot of view in edit mode: http://aasg.info/images/view11.gif
You Can Use Tabbed Views For This
You can put a tabbed pane
first will sunday
second will monday..
and so on it will be easy to navigate for the users..
Take this link for getting Tabbed view
http://drupal.org/node/87195
i it will be nice for U..
Inder Singh
http://indersingh.com