Widget widgetImage

From Snapp CMS Developer Documentation

Jump to: navigation, search

Contents

Usage in CMS

Example

PHP: echo $cms->loadWidget('Image',array('file':'image.jpg'));

Content: {Image:{"file":"image.jpg"}}

Widget widgetImage

Construction Configuration Options

Config Options Description
src, file, image : string (required) Image file to display (GIF, JPG, PNG)
align : string (optional) Alignment of Image Options: absmiddle, right, left,center,top,texttop,middle,baseline,bottom,absbottom
alt : string (required) rel attribute for a IMG tag
base_url : string (optional) Base Url to the Image eg http://www.cmssite.com/
border : int (optional) Size of Border on Image
class : string (optional) class name to apply to this content
color or colour : string (optional) Background Color of image when padding the image out the final size
height : int (optional) Height of Image to resize to
pad : bool (optional) Padd image out to full width and height specified
quality : int (optional) JPEG Image Quality 0 - 100
rel : string (optional) rel attribute for a IMG tag
width : int (optional) Width to resize image to

Example Output

<img src="{base_url)/cms/image.php?f={src}&p={pad}&s={width}x{height}&c={color}&p={quality}" width="{width}" height="{height}" border="{border}" alt="{alt}" rel="{rel}"/>
Core Components
Standalone Installs