This page last changed on Mar 27, 2012 by jed.wheeler@involver.com.

Overview

Renders an image using the cached url.

To configure an image, upload an image with a title unique to your campaign through the SML settings page, then use the title as the name attribute in the editable_image tag.  When naming your images acceptable characters are underscore, letters, and numbers.  Using periods and brackets in your image names will break the image.


Caching Considerations

This tag has no caching considerations.


Configuration

Note: The name must consist of only alphanumeric characters and spaces.

Providing a clickthrough URL will turn your image into a link to that URL.


Attributes

name type required description
name string true This is parameter identifies which image instance that you would like to use in your template code.
size string false Format: "WIDTHxHEIGHT" - WIDTH and HEIGHT must be integers. When only one integer is provided then it will be used to restrict the greatest dimension.
id string false CSS id attribute that will be added to the generated image tag.
class string false CSS class attribute that will be added to the generated image tag
onclick string false Allows you set javascript to execute on click
src_only boolean false If set to "true" then the tag will render only the image src urll; useful for using the tag to set a CSS background image url.

Context Variables

A context variable will be created corresponding to the name on the editable image tag. For example:

{% editable_image name:"My image" %}

This will create a context variable called my_image.


Examples

This will resize the image to exactly 500x120 pixels.

{% editable_image name:'logo' size:'500x120' id:'company-logo' class:'company-header' %}

When you do not specify the size attribute, then image will be displayed with its original dimensions.

{% editable_image name:'logo' id:'company-logo' class:'company-header' %}

This will render only the image url: "http://embed.involver.com/cache/imgs/3323484/300x200.png"

{% editable_image name:'logo' src_only:'true' %}

Using in an html image tag:

<img src="{% editable_image name:'fangate' src_only:'true' %}" alt="'Like' our page to enter." />

FAQ

This tag currently has no FAQ questions.


Related Topics


Document generated by Confluence on Feb 12, 2013 09:09