How to add images from the Gallery to Content
This page describes how to reference that image from photo gallery so it is visible from a webpage.
A webpage can be somewhat dull without any pictures. Adding a single image can greatly help the audience form a frame of reference to what you are trying to convey. For example, if you are writing a summary of a restoration project happening along the river, a picture of the crew, or equipment used, helps the reader gage the amount of effort and work involved in the project.
Adding an Image to the Image Gallery
The first step in this process is to add the image to the photo gallery. Please follow these instructions on how to upload an image to the gallery. Note that you will need a TRIG account to perform all of these functions.
Adding a Gallery Image to a Webpage
The second step is to create a new page within the TRIG website, and reference the photo that was added from that new page.
You can link to items in your embedded Gallery2 using a special code. This code will be replaced by a thumbnail image that is linked to the actual item in your Gallery.
Syntax:
[G2:item_id n=1 size=192 class=name frame=name]
- item_id (required): This is the item ID from Gallery2. If you look at the URL of the item, this is the last number. Note that if the item_id is a single photo, n must be 1.
- n (suggested): This is the number of photos you want the block to show. It will override whatever is set in the defaults (initially 1). Note: this will change past instances where you did not set n -- the reason for its suggested use.
- class: The block that Gallery2 returns is wrapped in a DIV so additional styling can be done. The classes for this DIV are located in g2_filter.css. Included with the module are "left", "right", and "nowrap". These position the image block to the left or right or on a line all its own with the text not wrapping. You can also add your own class(es) to the CSS file and they will automatically be available.
- size: The length of the longest side for the thumbnail. The other side is determined automatically to keep the same aspect ratio.
- frame: You can use just "frame" to assign a frame to the thumbnail regardless of whether it's for an album or a single item. Using aframe will only affect albums and iframe will only affect single items. Frames included with the default Gallery 2 install are: bamboo, book, brand , dots, flicking, gold, gold2, polaroid, polaroids, shadow, shells, slide, solid, notebook, wood.
