HowTo: Add a Gallery Relationship

Gallery Relationship:

A gallery relationship consists of two related content types. One content type for the ( gallery node ) and another content type for the ( Image nodes ). The Add a Gallery Relationship function ties these two content types together to form A Gallery Relationship, or a node gallery.

  • The gallery content type is listed on the create content page and is visible to the end user. The gallery node handles all creation, display and editing functions for the gallery (it is the control panel for each gallery). The gallery node calls upon the Image nodes when they are needed for display or editing.
  • The Image content type is not listed on the create content page and is hidden from the end user. The image nodes are used internally by the gallery node. The Image nodes are called upon by the gallery node when needed.

 

Steps to Add a New Gallery Relationship:

For this Relationship example: Lets make an art collection that displays oil paintings.
There will be an ( art_collection )content type and an ( oil_painting )content type.

 1. Goto: Administer > Content management > Content types > Add content type 
                 system path  admin/content types/add 

Name the new content types so they are easy to find in the content list when administering the website content.

  2. Create a content type for the (art_collection node) that will display and manage the (oil_painting nodes).
       *  This will be visible on the Create content page. ( example: Create content > Art collection )
       Content Type examples: node_gallery_gallery
                                              my_gallery_gallery
                                              art_collection

 3. Create a content type to hold the ( oil paintings ) for the ( art collection ).
      * This is the image( oil_painting )content type to be displayed by the gallery( art_collection )content type.
      * The ( oil_painting node ) is called upon by the ( art_collection node ) for creation, display and editing.
      * This will not be in the create content list, and will not be visible to the end user.
      Content Type examples: node_gallery_image
                                             my_gallery_photo
                                             oil_painting

 4. Uncheck the (content type named in step 3) in the Navigation Menu to remove it from the create content list.
      * This should not be in the create content list because it is used internally by the ( art_collection node ).
          Goto: Administer > Site building > Menus > List
                    system path  admin/build/menu/list 
       choose Navigation and Uncheck the new ( oil_painting ) content type named in step 3 above.
                                         - oil_painting

 
  5.  Add new ImageCache Presets for cover, thumbnail and display (or) skip this and reuse existing presets.
     Goto: Administer > Site building > ImageCache > List 
                    system path  admin/build/imagecache/list
     Name the new imagecache presets so they are easy to recognize for future gallery settings.
               example names: art-collection-cover, art-collection-display and art-collection-thumbnail.
     see also ( HowTo: Configure Node Gallery ) ImageCache Presets:
        

  6. Set the URL aliases for the new art collection and oil painting content types if using Pathauto.
          Goto: Administer > Site building > URL aliases > Automated alias settings 
                   system path  admin/build/path/pathauto 
           > Node path settings:                                    
                     Pattern for all art collection paths:
                      art-collection/[title-raw]
                     Pattern for all oil painting paths:
                      art-collection/[parent-node-gallery-title-raw]/[title-raw]
    see also ( HowTo: Install Node Gallery ) Configure Pathauto if Installed:
 

 7. Set the permissions for the new imagecache presets and content types ( art_collection and oil_painting )
      Note: The oil_painting content type is not visible on the create content page,
                 but still needs permissions in order to add, delete and edit oil paintings in the art collection.
          Goto: Administer > User management > Permissions 
                    system path  admin/user/permissions 
                        > imagecache  module
                            view imagecache art-collection-cover
                            view imagecache art-collection-display
                            view imagecache art-collection-thumbnail 
                        > node module
                             create oil_painting content
                             create art_collection content
                             delete any oil_painting content
                             delete any art_collection content
                             delete own oil_painting content
                             delete own art_collection content
                             edit any oil_painting content
                             edit any art_collection content
                             edit own oil_painting content
                             edit own art_collection content


                          ( Save )

You now have: 2 content types, Create content page in order, Imagecache presets, URLaliases, Permissions and you are ready.

         
  8. Add a Gallery Relationship:
         Goto: Administer > Site configuration > Node Gallery > Add a Gallery Relationship    
                   system path  admin/settings/node_gallery/add 

  9. Select the gallery content type created in step 2 using ( radio buttons )
          ( art_collection )

10. Select the gallery image content type created in step 3 using ( radio buttons )
          ( oil_painting )
 

         ( Next )

!  A New Gallery Relationship has been created !


-------------------------------------------------------------

Set up the new art gallery now that it has been created.
This part is actually a repeat from the configurations page.


2nd setup screen     Node Gallery
            Gallery Type Name: ( examples: Art collection or Oil painting collection )
                    The Name to show on the create content page.
            Gallery Directory: members/%username
                    Set the directory to hold images (sites/default/files is the root)
            Default Cover Image: sites/default/files/images/my_default_image.png
                   Specify a default cover image to show when there are no images in the gallery.
           
Number of uploads: 5
                     Select the number of upload buttons(fields) for images on each upload page.
                     (Please use caution when adding more than 4 or 5 as php.ini settings may need to be changed.)
            Fields:
                   Specify the fields to show(checkboxes).
                         Title, caption, revision info, comment settings, path settings
.
            Choose the content you want to display:
                   Specify the descrition text to be used when displaying image pages.
                   Choose gallery descrition (or) image description
.
            Image Comment Setting:
                    Specify the comment setting to use. (Image or gallery) as per setting in the content type.
            Images Sizes:
                    Select which imagecache preset to use for each image display(cover,thumbnail,display).
            Original Image Display:
                    Set the option to allow viewing full sized image disabled, with a link or lightbox2 popup.
            Teaser setting:
                    Specify how to display the gallery and image when viewing the node as a teaser.
            Gallery Landing Page Setting:
                     Choose thumbnails or thumbnails that open a lightbox2 gallery.

            Image Upload Limitation Default Settings:
                     Default permitted file exstensions:
                             Specify allowed file types ( jpg jpeg png ) (do not use a dot, use a space between each)
                     Maximum resolution for uploaded images:
                             Specify (width x height) in pixels.(use 0 for no limit, if you have trouble with uploads check this)
                     Default maximum file size per upload:
                             Specify a number in MB (calculated after Imagecache Preset resizes the files)
                     Default total file size per user:
                              Specify a number in MB (combined total size of all files a user is allowed to have in the system)
                     Default total file number per user:
                              Specify a number (combined total number of files each user is allowed to have in the system)
      
            Image Upload Limitation Settings for anonymous user: 
  note: This will not be visible until permissions have been set.
                     Default maximum file size per upload:
                             Specify a number in MB (calculated after Imagecache Preset resizes the files)
                     Default total file size per user:
                              Specify number in MB (combined total size of all files a user is allowed to have in the system)
                     Default total file number per user:
                              Specify a number (combined total number of files each user is allowed to have in the system)

           Image Upload Limitation Settings for authenticated user: 
  note: This will not be visible until permissions have been set.
                     Default maximum file size per upload:
                             Specify a number in MB (calculated after Imagecache Preset resizes the files)
                     Default total file size per user:
                              Specify a number in MB (combined total size of all files a user is allowed to have in the system)
                     Default total file number per user:
                              Specify a number (combined total number of files each user is allowed to have in the system)

 

           ( Previous )      ( Submit )

Now you have an art collection node that displays oil painting nodes, ( a node_gallery ).
Additional configurations can be made to the submission forms. See ( HowTo: Configure Node Gallery )

 ! You are now ready to create a Gallery using the new Gallery Relationship !
         Goto: Create content > Art collection or ( Gallery Type Name: specified in the setup )

Back to Top

 Back to Top