attribute view gui issue

Author Message

j jevack

Wednesday 02 November 2005 4:09:19 am

When I use {$node.object.data_map.page_body.content} I get the contents of the page_body attribute but when I use {attribute_view_gui attribute=$node.object.data_map.page_body.content} nothing is returned...the page is blank.

Can someone explain what I am doing wrong?

Regards,

Jason

Łukasz Serwatka

Wednesday 02 November 2005 4:17:16 am

Using {$node.object.data_map.page_body.content} gives direct output from your attribute, using {attribute_view_gui attribute=$node.object.data_map.page_body} will load template releted with page_body datatype. If you will go to design/standard/templates/content/datatype/view and preview eztext.tpl you will see code

{$attribute.content|wash( xhtml )|nl2br}

$attribute in case where you use {attribute_view_gui attribute=$node.object.data_map.page_body} holds $node.object.data_map.page_body

But you can display content of your attribute without using attribute_view_gui like $node.object.data_map.page_body.content.

Correct code for attribute_view_gui is {attribute_view_gui attribute=$node.object.data_map.page_body}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

j jevack

Wednesday 02 November 2005 4:29:37 am

Thank you Lukasz.

Which way is "correct" to display content? What does benefits does using attribute_view_gui provide?

Regards,

Jason

Łukasz Serwatka

Wednesday 02 November 2005 4:58:39 am

Depends on needs. Output from attribute_view_gui is template based so, you can add changes in output presentation in one place (change one template e.g eztext.tpl) and changes will affect in every place of your website.

If you need some "special" output presentation in one place of website then you can omit attribute_view_gui and use $node.object.data_map.page_body.content, so display content directly from attribute.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

j jevack

Wednesday 02 November 2005 5:07:46 am

Thank you. This was very helpful.

We are new eZ publish users and fast becoming big fans.

Regards,

Jason

Łukasz Serwatka

Wednesday 02 November 2005 5:12:34 am

You are welcome :) If you will have any other questions feel free to ask here ;)

Good luck!

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.