Add New: Content Type link works even when a view is used to select nodes

greg.harvey - May 20, 2009 - 15:26
Project:Popups: Add and Reference
Version:6.x-2.0-alpha1
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Firstly, why does this matter? Because on larger websites the sheer number of nodes might be too great so you want to use a Views view to filter them down, even though they are all of the same type.

I know it is already noted that your node reference must be for a single content type, so perhaps this is just a documentation issue, but if a view is being used to select nodes then the module should either:

- have an update to the documentation to note that you must still check a content type box in the CCK UI, even if you are using a view so technically don't need to (for CCK to work at least)
- if a view is selected, automatically look for a node type filter on the view (instead of the CCK content type checkboxes) and if there is one, *and* it only contains one type, use that type for the link automatically

These could be seen as two phases of the same feature request.

For now just the documentation would be good. =)

#1

sirkitree - May 20, 2009 - 16:38

I actually am using this myself - but in a slightly different way.

I've added another link (yes killing kittens - but contrib kittens) along with the 'Add new X' link - 'Choose existing'. This link opens the view that is referenced, and I usually set it to a view that will be pulling in nodes of the particular content type that can be added through the first link.

I know this sounds slightly redundant, but I'm also hiding the autocomplete field. Why? It was determined internally that the view in a popup (with a little extra .js to fill out the hidden autocomplete) was a better UX than just an autocomplete.

But back to the issue at hand, I'm in agreement - documentation would be helpful here.

 
 

Drupal is a registered trademark of Dries Buytaert.