Gallery Revisited

I've yet to create the video, but I came up with another way to create a gallery with Drupal yesterday. The problem comes down to a conceptual issue with the usage of Gallery. When I create dynamic galleries, they are usually based on taxonomy for sorting and calling back. But what about one-time galleries for events that could be called back, but since it was a single event I have no need to create multiple nodes every time I add pictures. I'm adding pictures once for this event, then I'm done with that until the next event. So, in this instance, the single node itself needs to be a gallery. I, acting as the Drupal gallery manager, need to be able to go back and sort those photos, add more, etc., but all in one node. Here's what I came up with: The Basic Setup:
  • Install the usual suspects (Drupal, CCK, Views, ImageField, FileField, ImageCache, ImageCache Actions, and any other dependencies)
  • Create your node type (Photo Gallery) and add your fields (FileField Upload as Image)
  • Create a taxonomy to apply to the gallery
  • Make your thumbnails and large sizes with ImageCache
With the basic setup complete, we can start creating content. In this instance of the gallery, each node is considered a separate gallery. I do this so all the pictures pertaining to an event are all in once place: the original node. We then apply certain views when displaying in order to achieve the desired effect: The Views Setup:
  • Create your normal gallery with views, based on taxonomy
  • Create an additional block view that uses the default argument for Node ID restricted to the URL. Set this view to be displayed as a grid.
Now we have a view displayed as a block that shows pictures, but is restricted to the NID in the URL. If we apply this block to display below the content, content will now show up with the pictures of the currently displayed node as a grid, or more of a gallery view. To clean it up, set your imagefields to NOT display when viewing the node. If you do that, your images will show up as if they were a gallery when you display the node. This was horribly written, but should give a basic idea of using single nodes as a gallery, but with the power of CCK and view. Video soon!
Share this

Tags: 

Comments

This I have to try out. I am implementing a photogallery website about a volleyball tournament in Spain, where members can upload their own photo's and assign it to a specific year. Thanks for sharing! I'm learning a lot about Drupal from your blog and video's.

Sorry for the late reply, but glad to help! How is the project coming along?