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.