Sourcefabric Manuals

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

Newscoop 4.1 Cookbook

Set objects

Set Article

Purpose:

Sets the runtime environment article to the one selected by the statement constraint. If the statement constraint was not valid, the section is not changed.

Syntax:

{{ set_article name="<article_name>" }}

Select the article having the specified name. If the supplied name was not valid, this parameter is not modified.

{{ set_article number="<article_number>" }}

Select the article having the specified number. If the supplied number was not valid, this parameter is not modified.

Constraints:

Cannot be used inside "list_articles", "list_article_attachments", "list_article_comments", "list_article_topics", "list_article_audio_attachments", "list_search_results" and "list_subtitles" statements.

See also "Set Default Article", and "Unset Article".

Set Current Issue

Purpose:

Sets the runtime environment issue to the last published issue.

Syntax:

{{ set_current_issue }}

Constraints:

Cannot be used inside any list statement.

See also "Set Issue", "Set Default Issue", and "Unset Issue".

Set Default Article

Purpose:

Sets the runtime environment article to the "default_article".

Syntax:

{{ set_default_article }}

Constraints:

Cannot be used inside "list_articles", "list_article_attachments", "list_article_comments", "list_article_topics", "list_article_audio_attachments", "list_search_results" and "list_subtitles" statements.

See also "Set Article", and "Unset Article".

Set Default Issue

Purpose:

Sets the runtime environment issue to the "default_issue".

Syntax:

{{ set_default_issue }}

Constraints:

Cannot be used inside any list statement.

See also "Set Issue", "Set Current Issue", and "Unset Issue".

Set Default Language

Purpose:

Sets the runtime environment language to the "default_language".

Syntax:

{{ set_default_language }}

Constraints:

Cannot be used inside any list statement.

See also "Set Language", and "Unset Language".

Set Default Publication

Purpose:

Sets the runtime environment publication to the "default_publication".

Syntax:

{{ set_default_publication }}

Constraints:

Cannot be used inside any list statement.

See also "Set Publication", and "Unset Publication".

Set Default Section

Purpose:

Sets the runtime environment section to the "default_section".

Syntax:

{{ set_default_section }}

Constraints:

Cannot be used inside "list_sections", "list_articles", "list_article_attachments", "list_article_comments", "list_article_topics", "list_article_audio_attachments", "list_search_results" and "list_subtitles" statements.

See also "Set Section", and "Unset Section".

Set Default Topic

Purpose:

Sets the runtime environment topic to the "default_topic".

Syntax:

{{ set_default_topic }}

Constraints:

Cannot be used inside "list_articles" and "list_article_topics" statements.

See also "Set Topic", and "Unset Topic".

Set Issue

Purpose:

Sets the runtime environment issue to the one selected by the statement constraint. If the statement constraint was not valid, the issue is not changed.

Syntax:

{{ set_issue number="<issue_number>" }}

Select the issue having the specified number. If the number supplied was not valid, this parameter is not changed.

Constraints:

Cannot be used inside any list statement.

See also "Set Default Issue", "Set Current Issue", and "Unset Issue".

Set Language

Purpose:

Sets the runtime environment language to the one selected by its English name. From this statement on, the language set is the newly chosen one. If the language name supplied was not valid, this variable is not modified.

Syntax:

{{ set_language name="<language_name>" }}

Filters:

<language_name> is the English name of the selected language.

Constraints:

Can not be used inside any list statement.

See also "Set Default Language", and "Unset Language".

Set Publication

Purpose:

Sets the runtime environment publication to the one selected by the statement constraint. If the statement constraint was not valid, the publication is not changed.

Syntax:

{{ set_publication name="<publication_name>" }}

Select the publication having the specified name. If the name supplied was not valid, this parameter is not modified.

{{ set_publication identifier="<publication_identifier>" }}

Select the publication having the specified identifier. The publication identifier is a unique number associated to the publication and is supplied by the Newscoop administration interface.

Constraints:

Cannot be used inside any list statement.

See also "Set Default Publication", and "Unset Publication".

Set Section

Purpose:

Sets the runtime environment section to the one selected by the statement constraint. If the statement constraint was not valid, the section is not changed.

Syntax:

{{ set_section name="<section_name>" }}

Select the section having the specified name; this has to be written in the language of the context. If the name supplied was not valid, this parameter is not modified.

{{ set_section number="<section_number>" }}

Select the section having the specified number; this is not dependent on context language. If the number supplied was not valid, this parameter is not modified.

Constraints:

Cannot be used inside "list_sections", "list_articles", "list_article_attachments", "list_article_comments", "list_article_topics", "list_article_audio_attachments", "list_search_results" and "list_subtitles" statements.

See also "Set Default Section", and "Unset Section".

Set Topic

Purpose:

Sets the runtime environment topic to the one selected by the statement constraint. If the statement constraint was not valid, the topic is not changed. Setting the environment topic will change the behaviour of an article list: only articles having that topic will be listed. For example:

{{ set_topic name="test:en" }}
 {{ list_articles }}
 ...
 {{ /list_articles }}

The example above 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:

{{ set_topic name"test:en" }}
<a href="{{ uri }}">text</a>

Syntax:

{{ set_topic name="<topic_name_lang_code>" }}
{{ set_topic identifier="<integer_value>" }}

Select the topic having the specified name:language pair or identifier. If the supplied value was not valid, this variable is not modified. The name:language pair must be written in the following format:

<topic_name_lang_code> = <topic_name>:<language_code>

Examples:

sport:en, music:en where 'sport' or 'music' is the topic name and 'en' is the English language code.

Constraints:

Cannot be used inside "list_articles" and "list_article_topics" statements.

See also "Set Default Topic", and "Unset Topic".

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

You should refresh this page.