Sourcefabric Manuals

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

Newscoop 4.2 Cookbook

List article authors

Note: this works only in Newscoop 3.5.0 and newer versions.


Create the list of authors to the article currently defined in the template environment. If the article was not defined, the list is empty. The code between the "{{ list_article_authors }}" statement and "{{ /list_article_authors }} is repeated for every author in the list. Inside the list every author is represented by an author object, (see "Author").


{{ list_article_authors [length="<integer_value>"]
                        [order="<author_order>"] }}
{{ /list_article_authors }}


  • length="<integer_value>": <integer_value> specifies list_length and forces the list to have at most list_length items. If the list contains more items than list_length items the interval of elements to be displayed can be switched using has_previous_elements and has_next_elements from the current_list object
  • columns="<integer_value>": <integer_value> specifies columns_number and sets an environment variable. This is incremented as if the items were placed in a table cell. The counting starts from one and the variable is incremented for every new element. When it reaches the maximum value it is reset to one. This is very useful in building tables of data. For details see current_list.
  • order="<author_order>"=
    • byFirstName: order by the author's first name
    • byLastName: order by the author's last name


Taken from Template Pack "The Journal" (date 2011-03-15) file "article-author-popup.tpl"

{{ list_article_authors }}
 <div id="hidden{{ $gimme->current_list->index }}Content"  class="teammemberinfo" style="display:none">
  <img style="width: 150px; float: left; margin: 0 10px 10px 0"
  src="{{ $gimme->author->picture->imageurl }}" />
   <h2>{{ $gimme->author->name }}</h2>
    <div class="text">
    {{ $gimme->author->biography->text }}
{{ /list_article_authors }}

Inside list_articles the following statements are forbidden:

  • set_language
  • set_default_language
  • unset_language
  • set_publication
  • set_default_publication
  • unset_publication
  • list_issues
  • set_issue
  • set_default_issue
  • set_current_issue
  • unset_issue
  • list_sections
  • set_section
  • set_default_section
  • unset_section
  • list_articles
  • set_article
  • set_default_article
  • unset_article
  • list_article_images

Inside the list, the current author is set to the current element of the list. The environment context is restored after the list processing.

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

You should refresh this page.