You will now import the content types which will make up the gallery. To keep this page tidy, I've provided each as separate text files attached to this page (scroll the bottom to download them). You MUST import the Photo Album content type and the Video Category content type "before" you import the Photo and Video types (this is because these latter two types include node reference fields that connect to the first two types).
For each type, go to Administer > Content management > Content types > Import (admin/content/types/import) and paste in the contents of one of the text files.
This gallery setup makes use of 4 separate content types. As you can likely guess, the Photo and Video types are the actual nodes which hold the photo/video media itself. The Photo Album and Video Category types act as "container" nodes which display groups of related Photo/Video nodes together (by means of an embedded View with a node reference argument, in case you're curious).
While Drupal does already have an excellent Taxonomy system built in for categorization (which may be more appropriate in some situations), the reasons for choosing to use node references in this case instead are:
On the other hand one trade-off with this method is losing the ability (which is simple with taxonomy) to have nested levels of albums/categories.
| Attachment | Size |
|---|---|
| gallery-content-type-photo_album.txt | 2.36 KB |
| gallery-content-type-video_category.txt | 2.39 KB |
| gallery-content-type-photo.txt | 6.56 KB |
| gallery-content-type-video.txt | 7.74 KB |