attribute_view_gui
Summary
Outputs the view template for a content object attribute.Usage
{attribute_view_gui attribute=attribute [ parameter=value [...] ]}
Parameters
Name | Type | Description | Required |
---|---|---|---|
attribute | object | The target content object attribute. | Yes. |
parameters | any | Parameter(s) that will be passed to the included template. | No. |
Description
This function shows the view interface for a content object attribute. The attribute must be specified (as a "ezcontentobjectattribute" object) using the "attribute" parameter. All other parameters (of any type) will be passed on and thus become available as template variables in the included template.
Balazs Halasy (06/02/2004 1:14 pm)
Balazs Halasy (28/04/2005 2:12 pm)
Comments
Exemple
Sunday 21 August 2005 1:21:02 pm
Stéphane
It would be usefull to have an exemple on how to use parameter with attribute_view_gui function.
Thank
Re: Exemple
Friday 13 January 2006 3:31:05 pm
Seth Gottlieb
{attribute_view_gui attribute=$node.object.data_map.file link_text='Download'}
Then in your attribute template you can access this variable by doing something like:
{$link_text}
Images
Tuesday 25 July 2006 6:47:05 pm
Kristian Hole
{attribute_view_gui attribute=$node.object.data_map.myimage image_class='large'}
Where the sizes are defined in image.ini.
attribute_view_gui
Monday 22 January 2007 8:14:11 am
lixuefeng
Re: attribute_view_gui
Monday 22 January 2007 8:24:16 am
xuefeng_lee
Re: attribute_view_gui
Thursday 19 April 2007 10:05:19 pm
nevens
created CSS and in belonging style class for this specific <p> tag, i set
margin: 0px;
this elegantly removed unnecessary space which <p> has by default.
attribute_view_gui and shorten
Friday 30 March 2007 9:56:05 am
Toma
Re: attribute_view_gui and shorten
Thursday 05 April 2007 8:39:29 am
Alimi Nabil
You can't use attribute_view_gui with shorten operator. Depending of the datatype, having something like
$your_attribute.content|shorten( 20...)
should do. However, if you want to keep the attribute_view_gui mechanism, you might consider customizing the template invoked with the attribute_view_gui operator by copying it in your design folder-path. (content/datatype/view/ezstring.tpl for example).Therefore you can pass any parameters you want provided you handle it in the template.