Select the list of articles according to the given constraints and current environmental variables. The publication, language, issue, section and article variables may not be defined outside the list_articles statement; inside the statement however, all these variables are defined. The code between "{{ list_articles }}" statement "{{ /list_articles }}" is repeated for every article in the list.
{{ list_articles [length="<integer_value>"] [columns="<integer_value>"] [constraints="<list_of_article_constraints>"] [ignore_publication="true"] [ignore_issue="true"] [ignore_section="true"] [ignore_language="true"] [location="<longitude, latitude>] [order="<order_condition>"] }} <list_of_instructions> {{ /list_articles }}
{{ list_articles length="10" columns="2" order="byPublishDate desc"}} {{ if $gimme->current_list->column == "1" }} left column {{ /if }} {{ /list_articles }}
<list_of_instructions> may contain any statement except those listed at the end of the page.
Taken from Template Pack "The Custodian" (date 2011-03-16) file "article.tpl"
{{ list_articles name="topic_articles" constraints="number not `$gimme->article->number` `$topic_cond` matchAnyTopic" ignore_issue=true length=3 }} {{ include file="classic/tpl/teaserframe_articlelistright.tpl" }} {{ include file="classic/tpl/pagination.tpl" }} {{ assign var="number_cond" value="`$number_cond` number not `$gimme->article->number` " }} {{ /list_articles }}
Examples of constraints:
constraints="issue greater 10 issue smaller 20"
constraints="section greater_equal 40 section smaller 60"
Note on author attribute: this works only in Newscoop 3.2.1 and newer versions.
Note on topics: the topic name must be written in the following format: <topic_name>:<language_code>
Examples of valid topic names:
sports:en
health:en
Note on topics: If a certain topic was defined in the template environment by use of the "set_topic" statement or URL parameter the list will change the behaviour of the articles list. Only articles having that topic will be listed. For example:
{{ set_topic name="test:en" }} {{ list_articles }} ... {{ /list_articles }}
This will list only articles having the topic 'test'. The topic is automatically appended to the URL parameters so you don't have to set the topic in the current page.
Note: byComments and byLastComment only work in Newscoop 3.2.2 and newer. byLastUpdate is implemented in Newscoop 3.5 and newer.
Inside the list the data context is defined by the constraints applied to the current article for every processed line. The data context is restored after the list processing.
Inside list_articles the following statements are forbidden:
list_articles statement cannot be used inside list_subtitles, or list_search_results statements.
Create a list of documents attached to the article currently defined in the template environment. If the article was not set the list is empty. The code between "{{ list_article_attachments }}" statement and "{{ /list_article_attachments }} is repeated for every attachment in the list.
{{ list_article_attachments [length="<integer_value>"] [columns="<integer_value>"] [language="current"] }} <list_of_instructions> {{ /list_article_attachments }}
Inside list_articles the following statements are forbidden:
Inside the list, the current article attachment is set to the current element of the list. The environment context is restored after the list processing.
{{ list_article_attachments }} {{ if $gimme->current_list->at_beginning }} <h4>Downloads:</h4> {{ /if }} <a href="/attachment/{{ $gimme->attachment->identifier }}"> {{ $gimme->attachment->file_name }}</a> ({{ $gimme->attachment->size_kb }}kb)<br/> {{ /list_article_attachments }}
Here is an example of how to use the attachment list to play a number of MP3 files:
{{ list_article_attachments }} {{ if $gimme->attachment->extension == "mp3" }} <object type="application/x-shockwave-flash" data="/templates/radioactive/apps/player_mp3_maxi.swf" width="200" height="20"> <param name="movie" value="/templates/radioactive/apps/player_mp3_maxi.swf" /> <param name="bgcolor" value="#444444"/> <param name="FlashVars" value="mp3={{ uri options="articleattachment" }}" /> <!-- player home: http://flash-mp3-player.net/ --> </object> {{ /if }} {{ /list_article_attachments }}
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>"] [columns="<integer_value>"] [order="<author_order>"] }} <list_of_instructions> {{ /list_article_authors }}
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 }} </div> </div> {{ /list_article_authors }}
Inside list_articles the following statements are forbidden:
Inside the list, the current author is set to the current element of the list. The environment context is restored after the list processing.
Create a list of comments attached to the article currently defined in the template environment. If the article was not defined the comments list is empty. The code between the "{{ list_article_comments }}" statement and "{{ /list_article_commnets }}" is repeated for every comment in the list.
{{ list_article_comments [ignore_language="true|false"] [ignore_article="true|false"] [length="<integer_value>"] [columns="<integer_value>"] [order="<order_condition>"] }} <list_of_instructions> {{ /list_article_comments }}
Note on ignore_article: this option will force the list order to date ordering. ignore_language and ignore_article only work in Newscoop 3.2.2 and newer.
The default order of the comments in the list (if no order condition was specified) is based on the tree structure of the comments as in the following example:
The first element in the list is the first comment that was submitted, second is it's first reply (if it exists), first reply of the first reply .. and so on down the tree structure, until it finds no other reply, second reply to the root element etc.
If the order by date condition was specified the comments are displayed strictly by their submission date, regardless of the relation they had to the other comments.
{{ list_article_comments order="byDate desc" }} Subject: {{ $gimme->comment->subject }}<br/> Posted {{ $gimme->comment->submit_date }} by <b>{{ $gimme->comment->reader_email }}</b> <br/> {{ $gimme->comment->content }} <br/> {{ /list_article_comments }}
The following example is taken from the Template Pack "The Custodian" (2011-03-16) file "comments.tlp"
{{ list_article_comments }} {{ if $gimme->current_list->at_beginning }} <a name="commentlist"> <h4> {{ if $gimme->language->name == "English" }}Previous comments {{ else }}Los comentarios anteriores {{ /if }} </h4> </a> {{ /if }} <div class="comment" {{ if $gimme->current_list->at_end }} id="everlast"{{ /if }}> <p><strong>{{ $gimme->comment->nickname }}</strong><br> {{ $gimme->comment->content }}</p> <p> <em> {{ $gimme->comment->subject }} | <span>{{ $gimme->comment->submit_date|camp_date_format:"%M %e, %Y" }}</span> </em> </p> </div> <!-- /.comment --> {{ /list_article_comments }}
Inside list_articles the following statements are forbidden:
Create a list of images attached 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_images }}" statement and "{{ /list_article_images }} is repeated for every image in the list.
{{ list_article_images [length="<integer_value>"] [columns="<integer_value>"] [order="<image_order>"] }} <list_of_instructions> {{ /list_article_images }}
Taken from Template Pack "The Custodian" (date 2011-03-15) file "article-gallery.tpl"
{{ list_article_images }} {{ if $gimme->current_list->count gt 1 }} {{ if $gimme->current_list->at_beginning }} <div id="article-gallery"> <h4>{{ if $gimme->language->name == "English" }}Article gallery {{ else }}Mini galera{{ /if }}: </h4> {{ /if }} <div class="gallery-item"> <a class="grouped_elements" href="{{ $gimme->article->image->imageurl }}" rel="group"> <img alt="{{ $gimme->article->image->description }}" src="{{ $gimme->article->image->thumbnailurl }}" /> </a> </div><!-- /.gallery-item --> {{ if $gimme->current_list->at_end }} </div><!-- /#article-gallery --> {{ /if }} {{ /if }} {{ /list_article_images }}
Inside list_articles the following statements are forbidden:
Inside the list, the current image is set to the current element of the list. The environment context is restored after the list processing.
Note: this works only in Newscoop 3.5.0 and newer versions.
Maps require jQuery: In order to use display maps you must include jQuery in the header of your document, with a link like this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
Create a list of map locations related 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_locations }}" statement and "{{ /list_article_locations }} is repeated for every location in the list. Inside the list every location is represented by a map location object, (see "Article Location").
{{ list_article_locations [length="<integer_value>"] [columns="<integer_value>"] }} <list_of_instructions> {{ /list_article_images }}
Ushahidi compatible KML format. You can use this as a feed to call as a layer in Ushahidi:
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <Document> <name>{{ $gimme->publication->name }}</name> <description><![CDATA[ .]]></description> {{ list_articles}} {{ list_article_locations }} {{ if $gimme->location->enabled }} <Style id="style{{ $gimme->article->number }}-{{ $gimme->current_list->index }}"> <IconStyle> <Icon> <href>http://www.sourcefabric.org/javascript/geocoding/markers/marker-gold.png</href> </Icon> </IconStyle> </Style> {{ /if }} {{ /list_article_locations }} {{ /list_articles }} {{ list_articles}} {{ list_article_locations }} {{ if $gimme->location->enabled }} <Placemark> <name>{{ $gimme->location->name }} @ {{ $gimme->article->name }}</name> <description></description> <styleUrl>#style{{ $gimme->article->number }}-{{ $gimme->current_list->index }}</styleUrl> <Point> <coordinates>{{ $gimme->location->longitude }},{{ $gimme->location->latitude }},0.000000</coordinates> </Point> </Placemark> {{ /if }} {{ /list_article_locations }} {{ /list_articles }} </Document> </kml>
Taken from Template Pack "The Journal" (date 2011-03-15) file "article-cont.tpl"
<p> Location(s): {{ list_article_locations }} {{ if $gimme->location->enabled }} {{ $gimme->location->name }} {{ if $gimme->current_list->at_end }}{{ else }}, {{ /if }} {{ /if }} {{ /list_article_locations }} </p>
Inside list_article_locations the following statements are forbidden:
Inside the list, the current location 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.