I constructed a view and added a nodequeue as a views relationship, I am presented with the options of:
- Require this relationship
- Limit to one or more queues (Recommended)
The following code is generated depending on the value of the limit option.
// Code generated when I limit to a specific queue
SELECT node.nid AS nid,
nodequeue_nodes_node.position AS nodequeue_nodes_node_position
FROM cf_node node
INNER JOIN cf_nodequeue_nodes nodequeue_nodes_node ON node.nid = nodequeue_nodes_node.nid AND nodequeue_nodes_node.qid = 2
WHERE node.status <> 0 OR (node.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1
ORDER BY nodequeue_nodes_node_position ASC
// Code generated when not limited to a specific queue
SELECT node.nid AS nid,
nodequeue_nodes_node.position AS nodequeue_nodes_node_position
FROM cf_node node
INNER JOIN cf_nodequeue_nodes nodequeue_nodes_node ON node.nid = nodequeue_nodes_node.nid
WHERE node.status <> 0 OR (node.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1
ORDER BY nodequeue_nodes_node_position ASC
I am finding that I would like to pass the QID directly into views via the URL and have views work correctly. I do not want to hard code the selection of the nodequeue qid via the Limit option. Is there a way to do this?
I was thinking of leaving the Limit option blank, and then adding a filter on QID but this didnt seem to work. I'm not sure what the url structure would be, but I used:
http://testsite.com/nodequeue/3 (with a relationship and a filter on QID)
Any advice would be appreciated.
Thanks!
Comments
Comment #1
arcane CreditAttribution: arcane commentedTo simplify what I said above, I would just like to have one single view that has the QID passed in without creating a separate view for each nodequeue. I wasn't able to get the module to create it automatically so I would like to do it manually. Can someone please advise? Thanks.
Comment #2
ezra-g CreditAttribution: ezra-g commented> I would just like to have one single view that has the QID passed in without creating a separate view for each nodequeue
Sounds like you're looking for the "Automatically create one view per queue" setting at admin/content/nodequeue/settings .
Comment #3
arcane CreditAttribution: arcane commentedHi Ezra, Im actually looking for the exact opposite. I have up to 40 nodequeues I wish to create, translating into 40 templates, and this number could exponentially explode. I don't understand why I can't just pass in the QID and just have it work. Why have the Limit option in the first place. If I don't use the limit option, I end up getting all of the nodes in all nodequeues. Am I missing something?
Comment #4
amateescu CreditAttribution: amateescu commentedYou are missing the point of a checkbox. Unchecking the "Automatically create one view per queue" option would provide the opposite, right? :)
Comment #5
arcane CreditAttribution: arcane commentedOk, maybe someone can help me understand. When I uncheck the checkbox, I get nodes for ALL nodequeues even though I pass in a specific nodequeue ID. This is not the desired behavior when I pass in a specific qid to the view. This is validated by the SQL shown above. Please advise on this since If this is not the intended behavior, then perhaps this is a bug?
Comment #6
ezra-g CreditAttribution: ezra-g commentedSorry about the misunderstanding there!
Can you paste an export of the view that's not working as you expect?
Comment #7
arcane CreditAttribution: arcane commentedThanks Ezra,
Here is the views export of the view automatically generated by the module. I edited the view to uncheck the limit option:
Comment #8
arcane CreditAttribution: arcane commentedLet me know if you need anything else.
Comment #9
arcane CreditAttribution: arcane commentedI have supplied the information, setting back to active.