Currently it is possible to create a TODO block using Views. Since the TODO module creates a field including one (or more) todo lists, you can just create a view that lists the TODO field.
I made a views TODO block that lists the TODO field (therefore showing the complete todo list) of the current node, if the node contains a todo field.
In my case i've put the TODO field in a content type 'Task' (which is related to a Project content type)
Create a views block of content fields,
Contextual filter: content ID, provide default argument: content id from URL,
specify validation criteria: content type Task.
Add field: content TODO list, with setting No results behavior: Hide if empty (since not all your nodes of that content type will have a TODO list filled in)
You can use extra fiters when needed.
Since the block and the node itself will now show the same TODO list, you can hide the display of the TODO field in the display settings of the content type (the task). After that, when a task node is displayed, the TODO block appears and shows the TODO list(s) of that specific task.
(note: above when i referer to 'task', i dont refer to the tasks in the TODO list, but my own content type 'Task')
Comments
Comment #1
vikramaditya234 commented+1
Comment #2
Dave Sandilands commented+1
Comment #3
Yuri commentedCurrently it is possible to create a TODO block using Views. Since the TODO module creates a field including one (or more) todo lists, you can just create a view that lists the TODO field.
I made a views TODO block that lists the TODO field (therefore showing the complete todo list) of the current node, if the node contains a todo field.
In my case i've put the TODO field in a content type 'Task' (which is related to a Project content type)
Create a views block of content fields,
Contextual filter: content ID, provide default argument: content id from URL,
specify validation criteria: content type Task.
Add field: content TODO list, with setting No results behavior: Hide if empty (since not all your nodes of that content type will have a TODO list filled in)
You can use extra fiters when needed.
Since the block and the node itself will now show the same TODO list, you can hide the display of the TODO field in the display settings of the content type (the task). After that, when a task node is displayed, the TODO block appears and shows the TODO list(s) of that specific task.
(note: above when i referer to 'task', i dont refer to the tasks in the TODO list, but my own content type 'Task')
Comment #4
fizk commentedThanks Yuri, I'll add this to the README and front page.
Comment #5
fizk commentedWith #1316380: Views integration for individual todo items, we now have complete information of todos in views.
Like Yuri explained, if you want the myTinyTodo widget, use the todo field that you added to your content type.