user1849962
user1849962

Reputation: 1363

image display in drupal

i would like to create an image gallery on my homepage in drupal. Each image will have been uploaded by the user, and, as i understand it, will be saved in some image directory folder in drupal. My question concerns a recent tip i picked up in response to the general debate whether or not it is good to store images as blob in mysql. The tip was to store the filenames of the images in mysql so you can essentially still sort the files. I was wondering whether this would be possible even if the files url is in drupal so to speak. It should be possible shouldn't it? I new to programming you see and want to the images on my homepage to be periodically refreshed according to a define sorting function. I would greatly appreciate any response to this question. Cheers.

Upvotes: 0

Views: 241

Answers (1)

Mohsen Hosseinalizadeh
Mohsen Hosseinalizadeh

Reputation: 315

You can using content types and views module for create gallery in Drupal 7.

  1. First create new content type with gallery name(admin/structure/types/add).
  2. Then add a image field to gallery content type and save it.
  3. If you want have thumbnail of image you should create a image style. for example create a image style with thumbnail_custom name and add suitable effect(admin/config/media/image-styles/add). You will use of this image style in views in the next step.
  4. Then create a new view with gallery-view name. uncheck create a page, check create a block, enter block title and item per page you want(admin/structure/views/add).
  5. In Filter criteria from block details add content type gallery.
  6. In Fields add Content image that appears in node:gallery and select and select thumbnail_custom for image style option.
  7. Save view.
  8. This view block appears in Blocks section and you select region for it.
  9. If you want this block appears only in the front page, in configuration of this block in the section pages of visibility settings check "Only the listed pages" option and then enter "<front>" phrase in textarea.

Upvotes: 1

Related Questions