The correct way to display the author name without email

Author Message

Softriva .com

Wednesday 03 January 2007 1:06:11 am

I am using the following to display the author name:

{$article.object.data_map.author.content.author_list.0.name}

Is this a good way?

André R.

Wednesday 03 January 2007 3:43:06 am

That would probably work, but for best practice you should add a wash() operator.

Or:

{if $node.data_map.author.content.is_empty|not()}
{attribute_view_gui attribute=$node.data_map.author}
{/if}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Softriva .com

Wednesday 03 January 2007 8:22:47 am

Dear,

This code works but still shows the author email of the author. I don't want to email of the author to be shown.

Thank you

{if $node.data_map.author.content.is_empty|not()}
{attribute_view_gui attribute=$node.data_map.author}
{/if}

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