Documentation · ViewHelper reference

XSD schema file | vhs master

Resource / ImageViewHelper

ViewHelper to output or assign a image from FAL. /

  • Tag usage example

    <v:resource.image identifier="[mixed]" categories="[mixed]" treatIdAsUid="1" treatIdAsReference="1" relative="1" width="NULL" height="NULL" minWidth="NULL" minHeight="NULL" maxWidth="NULL" maxHeight="NULL" class="NULL" dir="NULL" id="NULL" lang="NULL" style="NULL" title="NULL" accesskey="NULL" tabindex="123" onclick="NULL" usemap="NULL" ismap="NULL" alt="NULL" as="NULL">
    	<!-- tag content - may be ignored! -->
    </v:resource.image>
  • Inline usage example

    {v:resource.image(identifier: [mixed], categories: [mixed], treatIdAsUid: 1, treatIdAsReference: 1, relative: 1, width: 'NULL', height: 'NULL', minWidth: 'NULL', minHeight: 'NULL', maxWidth: 'NULL', maxHeight: 'NULL', class: 'NULL', dir: 'NULL', id: 'NULL', lang: 'NULL', style: 'NULL', title: 'NULL', accesskey: 'NULL', tabindex: 123, onclick: 'NULL', usemap: 'NULL', ismap: 'NULL', alt: 'NULL', as: 'NULL')}

Arguments

Argument Description Type
accesskey

Keyboard shortcut to access this element

string
alt

Equivalent content for those who cannot process images or who have image loading disabled.

string
as

If specified, a template variable with this name containing the requested data will be inserted instead of returning it.

string
categories

The sys_category records to select the resources from (either CSV, array or implementing Traversable).

mixed
class

CSS class(es) for this element

string
dir

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

string
height

Height of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
id

Unique (in this file) identifier for this HTML element.

string
identifier

The FAL combined identifiers (either CSV, array or implementing Traversable).

mixed
ismap

Specifies that its img element provides access to a server-side image map.

string
lang

Language for this element. Use short names specified in RFC 1766

string
maxHeight

Maximum height of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
maxWidth

Maximum width of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
minHeight

Minimum height of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
minWidth

Minimum width of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
onclick

JavaScript evaluated for the onclick event

string
relative

If FALSE resource URIs are rendered absolute. URIs in backend mode are always absolute.

boolean
style

Individual CSS styles for this element

string
tabindex

Specifies the tab order of this element

integer
title

Tooltip text of element

string
treatIdAsReference

If TRUE, the identifier argument is treated as reference uids and will be resolved to resources via sysfilereference.

boolean
treatIdAsUid

If TRUE, the identifier argument is treated as resource uids.

boolean
usemap

A hash-name reference to a map element with which to associate the image.

string
width

Width of the image. Numeric value in pixels or simple calculations. See imgResource.width for possible options.

string
Required attribute

Revision history

commit 7de5f54c813a4b9f2fc8cafd131c47c385c55a6f
Author: Danilo Bürger <*****@hmspl.de>
Date:   Tue Oct 29 23:01:49 2013 +0100

    [FEATURE] Added FAL vhs

commit 1c5eb2166f8adb7d3da3e28f7e99ed140a75b161
Author: Danilo Bürger <*****@hmspl.de>
Date:   Wed Oct 30 00:23:53 2013 +0100

    [FEATURE] Added categories argument for FAL vhs

commit ed15bec7ec1450244979567f31ea9e8b7c3bc374
Author: Claus Due <*****@namelesscoder.net>
Date:   Wed Nov 6 03:21:04 2013 +0100

    [FEATURE] ViewHelperUtility for reusable methods

commit b8a455e8f69275ffc6223d5b2595329f556db56e
Author: Danilo Bürger <*****@hmspl.de>
Date:   Fri Dec 13 12:46:18 2013 +0100

    [FEATURE] Resources.image as with image info

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 12ff0ddfb8d36c51f2d3befde7ae812177c80d5d
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Wed Jun 11 00:01:47 2014 +0200

    [TASK] CGL remove use leading backslash
    PHP Docs
    Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\Bar as opposed to global names that do not, such as FooBar),
    the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.

commit 4981055359c895f3869e5bd878293b3c15ed26e5
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 14:01:04 2015 +0100

    [TASK] CGL - Define classes, params, use imports

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file