Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

class_icon

Summary

Outputs an image tag referencing a class icon.

Usage

input|class_icon( [ size, [, alt_text ] ] )

Returns

A string containing an image tag.

Description

This operator generates an image tag that references a class icon. The name of the icon must be provided using the input parameter. The "size" and "alt_text" parameters are optional (see the description above). The operator uses the settings provided by the "icon.ini" configuration file (or an override).

Examples

Example 1

{'folder'|class_icon( 'small', 'Alternative image text' )}

The following output will be produced:

 

Balazs Halasy (21/03/2005 9:45 am)

Balazs Halasy (04/05/2005 2:24 pm)


Comments

  • Third parameter

    Just like the mimetype_icon operator, the class_icon operator also accepts a third optional parameter for the return_type.

    See http://ez.no/doc/ez_publish/techn...perators/miscellaneous/mimetype_icon
  • Washing

    Note that the alt_text gets also gets washed by this operator, so don't wash it yourself.