Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.2 Cookbook

Managing multiple authors and articles

Newscoop has a built in author management tool in which you can create and edit author accounts, with biographies, pictures and other information. You can also create different kinds of author accounts, for photographers, translators, researchers or other contributors - multiple authors can be assigned to a single article.

The following sample code will explain how to print author information when displaying an article. You can print an author's last and first name, their image URL, full name, author type (photographer, etc.), their email address and biographical text.

{{list_article_authors}}
<!-- lets divide authors with comma -->
{{if $gimme->current_list->index!=1}},&nbsp;{{/if}}

<!-- code below creates an url to author profile if author is linked with user in Newscoop Admin Panel. You can read more about it in Author and User profiles section -->
{{ if $gimme->author->user->defined }}
<a href="{{ $view->url(['username' => $gimme->author->user->uname], 'user') }}">
{{ /if }}

<!-- we want to show author name from biography because it is translateable -->
{{ if $gimme->author->biography->first_name }}
{{ $gimme->author->biography->first_name }} {{$gimme->author->biography->last_name }}
{{ else }}
{{ $gimme->author->name }}
{{ /if }}

{{ if $gimme->author->user->defined }}
</a>
{{ /if }}

({{ $gimme->author->type|lower }})
<img src="{{$gimme->author->picture->imageurl}}" alt="author picture" />
{{$gimme->author->email}}
{{$gimme->author->biography->text}}
{{/list_article_authors}}

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.