Basic Image Gallery for Drupal 7
How to make a Basic Image Gallery in Drupal
The video takes the learner through creating content types. The presenter creates a content type called image and uses the default options, then adds a field "photo" of type "image" and uses the "image" widget to the content type to use for the image upload.
Following the setting up of the image content type, several images are added to use for the galley. After this the gallery can be built.
Adding the Image Content Type:
New content types are created in Structure / Content Types / Add content type. (If you don't have the admin Menu module installed, now is a good time to get it...) Give the content type a name (e.g. Image or Photo) and any other information, then and click 'Save and add fields' to continue.
A new field needs to be added to the content type - Call the field photo and select the field type 'image' and the field 'image' widget. Configure any field options, e.g. file directory, maximum image upload size and so on as well as setting the limit to 1 (attaching more than one image to each content item will cause problems when the gallery is built... Also select the image display size - "large". The other options will use either the thumbnail or medium size. This new content type will only be used for images, so the 'body' field can be deleted. Save everything! Now create the image content items.
Creating the Gallery View
Setting up the view using the quick Drupal 7 Views quick start (first view creation panel) then moving on to setting up filters and adding the photo field and style of image display for the gallery. finishing with some tweaks to the gallery display. Find out more about using Views from our Introduction to Drupal 7 Video Guide Series
Drupal 7 Modules Required For Gallery Tutorial
In order to follow the steps shown in the video, the following modules need to be installed and enabled on the site.
- Field Module
- Field UI Module
- Field SQL Storage Module
- File Module
- Image Module
Additional Modules Required For Gallery Tutorial:
- Ctools Module
- Views Module
- Views UI Modules