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.

eZ debug

Timing: Jan 19 2025 01:22:42
Script start
Timing: Jan 19 2025 01:22:42
Module start 'layout'
Timing: Jan 19 2025 01:22:42
Module start 'content'
Timing: Jan 19 2025 01:22:44
Module end 'content'
Timing: Jan 19 2025 01:22:44
Script end

Main resources:

Total runtime1.3930 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 590.5469152.6563
Module start 'layout' 0.00600.0040 743.203139.5078
Module start 'content' 0.01001.3814 782.7109533.3984
Module end 'content' 1.39140.0015 1,316.10948.0938
Script end 1.3929  1,324.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.3559160.0003
Check MTime0.00140.1017160.0001
Mysql Total
Database connection0.00080.054810.0008
Mysqli_queries1.340296.2074570.0235
Looping result0.00060.0440550.0000
Template Total1.356997.420.6785
Template load0.00340.241320.0017
Template processing1.353697.169620.6768
Template load and register function0.00020.012710.0002
states
state_id_array0.00120.085310.0012
state_identifier_array0.00110.076520.0005
Override
Cache load0.00300.2162160.0002
Sytem overhead
Fetch class attribute can translate value0.00120.085620.0006
Fetch class attribute name0.00200.146840.0005
XML
Image XML parsing0.00080.058920.0004
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00210.1486170.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs