Closed (works as designed)
Project:
Node reference views
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2009 at 22:49 UTC
Updated:
17 Jul 2009 at 16:27 UTC
If the view is empty, shouldn't the view still be rendered and let the view settings handle the display ?
I'd like to be able to have the view empty text settings be displayed if there are no nodes to show in the view, but the way the code is now, if there are no nodes in the node reference field, then the view isn't rendered at all.
I tried modifying the code to pass in an empty argument array to the view preview instead of just returning null, but that didn't seem to work for some reason.
I don't know the views API well enough to provide a patch... if you could provide me with pointers as to how best to do this, i can have a go at providing a patch.
Comments
Comment #1
joachim commented> If the view is empty, shouldn't the view still be rendered and let the view settings handle the display ?
Not really -- with other CCK formatters, you simply get nothing displayed if the field is empty.
You could hack this bit:
but it's really going against the grain of CCK, so it's not something I would include in the module.
Comment #2
dayre commentedOk... that makes sense. Perhaps it could be an option for this formatter type ? I'll look into it and let you know.
Comment #3
dayre commentedok... i give up. Thought it would be nice if there were an option in the formatter settings in the node type for that field to add some "display view even if empty" option... but cck doesn't have any hooks or settings for formatters that can integrated into the CCK admin.
So, i'll just do something goofy in the view template.
Comment #4
joachim commentedYeah, there's nothing to give options for formatters.
Though I see date fields have a secnd dropdown in the display options. No idea how date module manages that, though it's probably per-field type.