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.

attribute_view_gui

Summary

Outputs the view template for a content object attribute.

Usage

{attribute_view_gui attribute=attribute [ parameter=value [...] ]}

Parameters

NameTypeDescriptionRequired
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

    Hello,

    It would be usefull to have an exemple on how to use parameter with attribute_view_gui function.

    Thank
    • Re: Exemple

      In your calling template you do something like:

      {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

    If you are displaying the image datatype (not objectrelation as the normal article class contains) you have the possiblility to set the size with image_class. Like this:

    {attribute_view_gui attribute=$node.object.data_map.myimage image_class='large'}

    Where the sizes are defined in image.ini.
  • attribute_view_gui

    we know ,if we use this function .the system will insert a tag-<p> automatically! but i do not need this tag! but i want to display a object of XML.and i do not need <p>.so what i should do!?
    • Re: attribute_view_gui

      i guess you mean is :you use "attribute_view_gui" to display a XML,but template in ez can insert a <p> tag automatically.but you do not need a <p>. that is a question ,let me have a think
  • newline and override

    Ok... The first thing to do is to override ALL those templates to avoid that stupid carriage return that put the code on a new line from the {* DO NOT EDIT blablabla *} comment because it's a white space in HTML.
    the <p> story is also a matter of overriding the associated template.
    • Re: newline and override

      Sorry I was a little bit nervous. But it's true that for really controled plain text output (csv,xhtml source,...), attribute_view_gui is nearly unuseful.

      The <p> seems to not come from the attribute_view_gui but from Online Editor, doesn't it? content.input.input_xml contents <p>your text</p><p>&nbsp;</p>, suspect.
      Can someone confirm this?