Posted by kirilius on January 10, 2011 at 7:47pm
I have a node type Gallery and I am building a view that displays each gallery as a grid of thumbnails. The view has one argument: Node ID. I need to add that as as an exposed filter so the users will see ALL galleries in a drop-down list and when they select a gallery, it will be displayed below.
The catch is that the list of my galleries is not static - I can add/remove/rename existing galleries. Basically I need the drop-down list to be populated from another view.
What is the best way to do this?
Categories: dynamic, Exposed Filters, views
Comments
CCK node reference module
Look at the CCK node reference module. This will give you the ability to create a content type, add a field that is a reference to another content type, then configure your view to expose a filter of that field type.
SO, image content type, gallery content type. Image type has a node reference field against the gallery type. Expose the gallery filter and you'll have a view with drop down of all current galleries.
Hope this helps!
bh
bh
http://www.adworkshop.com/
Thanks, that is certainly one
Thanks, that is certainly one option but I don't wan't to over-complicate my site design. Currently I have a node type Gallery with a title and one field for all images. It is pretty simple to manage, I can use SWFUpload, referential integrity is there by default... If I go node-per-image, I would have to give up all that.