

- #Photo gallery module drupal 7 how to
- #Photo gallery module drupal 7 install
- #Photo gallery module drupal 7 code
webkit-transform: rotate(5deg) translate(40px,2px) ms-transform: rotate(5deg) translate(40px,-2px) o-transform: rotate(-2deg) translate(0px, 2px) moz-transform: rotate(-2deg) translate(0px, 2px) webkit-transform: rotate(-2deg) translate(0px, -2px) ms-transform: rotate(-2deg) translate(0px, 2px) o-transform: rotate(-5deg) translate(-40px, -2px) moz-transform: rotate(-5deg) translate(-40px, -2px) webkit-transform: rotate(-5deg) translate(-40px, 2px) ms-transform: rotate(-5deg) translate(-40px, -2px) webkit-transform:rotate(0deg) translate(0px)
#Photo gallery module drupal 7 code
Go into the theme css directory (themes/bartik/css/) and open style.css, add this code to bottom:

In this step, I'm going to add some effects (inspire from Google+). Now you have a gallery page with thumbnail link to original image file. $masthead_raw = image_style_url('gallery-thumb', $image_uri) įield_img) ?>" rel="group-nid ?>" class="fancybox">Ĭlear your site cache and refresh views gallery page. Open and replace with this code:įor ($i = 0 $i field_img Go into the theme directory (themes/bartik/templates/), find, copy, paste and rename to ( gallery is your content type machine name, read more here). Go to Structure -> Views and add new views: Step 4: Create Gallery page with Views module Next, click to "manage display" next Gallery content typeĪfter this step, you'll need to add some demo content (go to your_site/node/add/gallery). On image gallery field settings, scroll to "Number of value" and choose "Unlimited". Click "Create new style" and add "Scale and Crop" effect, fill 150 in with, and 150 in height.Īfter create content type, go to Structure -> Content Types and click to "manager fields" next Gallery content typeĭelete body field and add new "Image Gallery" field. This is pretty simple, just follow the prompts and fill in the fields.įrom admin toolbar, go to Configuration -> Image Styles (your_site/admin/config/media/image-styles), add new style name "gallery-thumb".

Go to Structure -> Content Types (/admin/structure/types) and add a new content type called Gallery (remember this machine name for step 5). Not sure? you can read installation guide here) and the views module.
#Photo gallery module drupal 7 install
Requirementsįor this tutorial you will need to install Drupal 7 (because this tutorial for Drupal 7. Yes, you can use any theme you want.ĭemo for this tutorial here.

#Photo gallery module drupal 7 how to
Through the tutorial I'm going to show you how to create an image gallery page on Bartik (Drupal's default theme) theme. I will show you how to create a gallery page that you could easily modify or customize. It should look something like this.Create an image gallery in Drupal is not difficult, you can use some modules but they're often more than you need and sometime difficult to tweak. Second you need to create a function which can be used to generate an alias. Here you can give info about which type of token can be used for path replacements etc. The solution that Letharion posted will work fine, but making integration with path auto is a better solution like (s)he writes.ĭoing this in not that hard, but it can be a bit tricky to do the first time.įirst you need to implement hook_pathauto in order to get the setting for how the alias should look like.
