Involver Developer Network : image_gallery
This page last changed on Oct 18, 2011 by jed.wheeler@involver.com.
OverviewProvides the ability to display a set of images uploaded by an administrator. ConfigurationImages are uploaded for display via the configuration panel. Once files are uploaded, a featured image may be set. By default, the featured image will be the most recently uploaded image. Caching ConsiderationsAny images displayed through Facebook will be cached by Facebook. Attributes
Context Variables
ExamplesThese are a few model configurations of the image gallery tab. Basic ConfigurationThis creates a simple unordered list of images with their titles appended as alt text. {% image_gallery %}
<ul>
{% for image in image_gallery.image_items %}
<li>{{ image.image_url | img_tag:image.title }}</li>
{% endfor %}
</ul>
{% endimage_gallery %}
The same thing again but using tablerow instead of for to create a table of images. {% image_gallery %} <table> {% tablerow image in image_gallery.image_items cols:3 %} {{ image.image_url | img_tag:image.title }} {% endtablerow %} </table> {% endimage_gallery %} User "Badges" generated from an image_gallery using share tags {% image_gallery %} <table> {% tablerow image in image_gallery.image_items cols:3 %} {% capture badge %}{{ image.image_url | resize_to:"square" | resize_to:"90" | img_tag:image.title }}{% endcapture %} {% capture description %}I've earned the {{ image.title }} Badge! Wow, I sure am cool!{% endcapture %} {% share image label:badge image:image.image_url name:image.title caption:image.title description:description onclick:"Analytics.logClickthrough('Badge Post Count')" %} {% endtablerow %} </table> {% endimage_gallery %} Using ajax_link to show a featured image and thumbnails{% partial name:"featured" %} {{ featured_pic.image_url | img_tag:featured_pic.title }} {% endpartial %} {% image_gallery %} <div id="featured_container"> {% render partial:"featured" image_gallery:image_gallery featured_pic:image_gallery.featured_image_item %} </div> <ul class="block-list"> {% for image in image_gallery.image_items %} <li>{% ajax_link partial:"featured" container:"featured_container" featured_pic:image image_gallery:image_gallery %}{{ image.image_url | resize_to:"square" | resize_to:"90" | img_tag:image.title }}{% endajax_link %}</li> {% endfor %} </ul> {% endimage_gallery %} Related Topics |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |