The attribute template operator
Registered in lib/eztemplate/classes/eztemplateautoload.php by the class eZTemplateAttributeOperator (lib/eztemplate/classes/eztemplateattributeoperator.php).
The same class also registers: dump.
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
show_values | string | no | '' |
max_val | numerical | no | 2 |
format | boolean | no | 'html' |
The operator works on its input: the value before |.
Example
Built from the parameter list above; the values are placeholders (the operator's template hints decide whether it takes an input).
$value|attribute( 'show_values', 2, 'html' )In a shipped template
The first use in the templates of this installation, design/admin/templates/shop/dashboard.tpl line 240:
<p class="a4-shop-note">'A class is a product class when it has a price attribute (%types). Only its published objects can be added to the basket.'|i18n( $ctx, , hash( '%types', 'ezprice, ezmultiprice' ) )</p>Related
Generated by ./console exp:help:examples from lib/eztemplate/classes/eztemplateautoload.php, lib/eztemplate/classes/eztemplateattributeoperator.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.