1

I have a custom node type in Drupal - Order - which has a status field. The status can have three values.

What I would like to do is create a view in which orders are grouped into columns based on their status - essentially a primitive Kanban board - and the columns are ordered in a particular way.

Is this possible and if so, how?

0

One possible solution would be to use the Views Field View module, which provides a Global: View option as a field in a view.

https://www.drupal.org/project/views_field_view

Main View

You would create a main page view, use the Table format. Then create an Embed display for each status that filters your items by that status.

Back on your main view you would add a Global: View field for each status and select your status displays.

enter image description here

I'll note that the main page view needs to bet set to show 1 item, so you don't have multiple rows of the same content. Each embed display would be set to show all items.

One issue with this method is the vertical alignment is in the middle of the table columns when there are is a different number of items per column.

It's a little bit hacky but may be a step in the right direction.

  • I'll take hacky and give this a go now - thanks! I'm keen to understand the most Drupally way of doing this without having to drop down to code. – James Naish Jan 18 '18 at 21:10
  • Okay, so I'm 90% of the way to implementing this - main page view and all embedded display views are created. I've also added my View fields to my main page view. However, when I go to set the view on each View field I am doing the following: 1. Set the View to my "Orders by status" view (the one we are setting up here) 2. Set the Display to any of the embedded displays we've just created. I get the following error message: "An illegal choice has been detected. Please contact the site administrator." My embed displays are all Grids whereas my main display is Table. Thoughts? – James Naish Jan 18 '18 at 21:36
  • Okay, this is weird. I get the error message if no label is specified for the embedded view or if the label text is just "View". As soon as I give it another name, the view works and I now have what I want! Thanks. – James Naish Jan 18 '18 at 22:00
  • Oh yeah, I forgot to mention that I experienced weird behavior with the illegal choice issue when selecting my views. Glad you got it sorted out! – thumbson Jan 18 '18 at 22:57
  • Thanks, also it's worth noting that to get this to work I had to create the embedded displays on a separate view to the one I was displaying them in. Getting another issue now though which is that records seem to appear totally randomly in columns with no regard for the filters. – James Naish Jan 19 '18 at 9:52
1

I don't think it is possible right now without custom programming (either within a theme or custom module)

You can probably get started with grouping your view based on the status field and than using CSS in your theme (display:inline or float: left) you can get all groups next to each other.

There could be more sorting criteria for each column within the view.

For extra functionality like dragging/dropping within status areas (changing status) you will need to create your your own module to handle drag drop events and do ajax calls to the backend.

There was some work done for openlucius (drupal 7) that you can look at https://www.drupal.org/project/openlucius_board

  • 1
    Thanks. I did come across the openlucius board and this would have been ideal. For now though, I'm just interested in getting the nodes to appear in the correct column. – James Naish Jan 18 '18 at 19:15
  • Okay, so I'm 90% of the way to implementing this - main page view and all embedded display views are created. – James Naish Jan 18 '18 at 21:33
0

Check out Content Planner Drupal 8 contrib module - it provides Kanban planning.

kanban

Drupal Content Planner helps you to create, plan and manage content. It offers a dashboard, a content calendar and a todo list. It's completely open source and free to use.

Feature highlights Content Planner dashboard

content planner dashboard

Editorial team widget Content status widget Custom views widgets Kanban activities

Kanban board

Create custom widgets with plugins ...

Also, see this issue here, writing about Kanban solutions in Drupal and other open source platforms: https://www.drupal.org/project/contrib_tracker/issues/3046824

0

Another workaround to this Kanban board feature is to use multiple panels on a panels page. Combine with Views Auto Refresh for a more user friendly experience. Zero coding required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.