How to get all of the information of an author?

Author Message

zfirst zlast

Thursday 16 October 2008 2:31:02 am

Hi everyone,

I want to add a link to author of articles, when people click this link, it will take them to a new page to view this author's biography. And i know the link for this biography page may be like this:

<public_site_url>/Users/<group>/<firstname>-<lastname>

Then i found the following codes in the "ezauthor.tpl":

{foreach $attribute.content.author_list as $author}
{$author.name|wash( xhtml )}{delimiter}, {/delimiter}
{/foreach}

so the problem is how could i get the "group" of this author( maybe i should get the firstname and lastname of this author too )? In fact, i think i need to fetch all the information of this author. Do i have to modify the codes in kernel or anybody who have experience about this can help me?

Andreas Kaiser

Thursday 16 October 2008 4:18:35 am

There should be no need of changing the kernel codes...

Do you will use different user groups for the authors of the articles? If the group of the authors is always the same, you could hardcode the group in the url with concat. For example:

{concat( 'Users/<group>/', '$node.object.owner.name' )} (this code has not been tested...)

You could also use the node of the author object... In documentation:

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/datatypes/authors
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/objects/ezauthor

"author_list" contains the author id, but I can't say if this is the node id or the user id...

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

zfirst zlast

Thursday 16 October 2008 6:43:04 pm

Hi Andreas,

Thanx for your comments. But i don't think hard code for the "user group" is a good idea, because there's more than one "author groups" in my current version.

And i have checked the object "ezauthor", it seems that there's not a key "id" in the Attribute "author_list". As i got nothing on page via following codes:

{foreach $attribute.content.author_list as $author}
{$author.id | wash()}
{/foreach}

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 31 2025 01:21:43
Script start
Timing: Jan 31 2025 01:21:43
Module start 'layout'
Timing: Jan 31 2025 01:21:43
Module start 'content'
Timing: Jan 31 2025 01:21:43
Module end 'content'
Timing: Jan 31 2025 01:21:43
Script end

Main resources:

Total runtime0.0236 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.2656151.2266
Module start 'layout' 0.00540.0040 739.4922220.7344
Module start 'content' 0.00940.0128 960.2266997.8359
Module end 'content' 0.02220.0013 1,958.062533.9922
Script end 0.0235  1,992.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.9735140.0002
Check MTime0.00114.5158140.0001
Mysql Total
Database connection0.00072.829510.0007
Mysqli_queries0.002510.398430.0008
Looping result0.00000.067810.0000
Template Total0.00104.110.0010
Template load0.00073.114810.0007
Template processing0.00020.920610.0002
Override
Cache load0.00052.134510.0005
General
dbfile0.00177.353480.0002
String conversion0.00000.038440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs