Campsite: Lists
Lists
In this chapter:
- List of Languages
- List of Issues
- List of Sections
- List of Articles
- List of Article Attachments
- List of Article Comments
- List of Article Images
- List of Article Topics
- List of Article Audio Attachments
- List of Search Results
- List of Subtitles
- List of Subtopics
List of Languages
Note: this works only in 3.2.1 and newer versions.
Purpose:
Select the list of languages according to the given constraints and current environmental variables. The language variable may not be defined outside list_languages statement; inside the statement however, this variable is defined. The code between "{{list_languages}}" statement and "{{/list_languages}}" is repeated for every language in the list.
Syntax:
{{ list_languages [length="<integer_value>"]
[columns="<integer_value>"]
[of_publication="true|false"]
[of_issue="true|false"]
[of_article="true|false"]
[exclude_current="true|false"]
[order="<order_condition>"] }}
<list_of_instructions>
{{ /list_languages }}
where:
- length="<integer_value>": <integer_value> specifies the list length and forces the list to have at most list_length items. If the list contains more items than list_length items the intervals of elements to be displayed can be switched using has_previous_elements/has_next_elements from the current_list object.
- columns="<integer_value>":<integer_value> specifies the list columns number and sets an environment variable. This is incremented as if the items would be 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.
- of_publication: if true, will list languages in which publication issues were translated
- of_issue: if true, will list languages in which the current issue was translated
- of_article: if true, will list languages in which the current article was translated
- exclude_current: if true, will not include the current language in the list
When none of the three attributes (of_publication, of_issue, of_section) was specified it will list all available languages in Campsite.
<list_of_instructions> may contain any statement except those listed at the end of the page.
| <order_condition>= |
byNumber desc|asc
|byName desc|asc
|byEnglish_Name desc|asc
|byCode desc|asc
|
Order conditions are self-explanatory.
Inside the List the following environment variable is modified:
- language: if not defined before list start
The environment is restored after the list ends.
Constraints:
Inside list_issues the following statements are forbidden:
- set_language
- set_default_language
- unset_language
- list_languages
List of Issues
Purpose:
Select the list of issues according to the given constraints and current environmental variables. The publication, language and issue variables may not be defined outside list_issues statement; inside the statement however, all these variables are defined. The code between "{{ list_issues }}" statement and "{{ /list_issues }}" is repeated for every issue in the list.
Syntax:
{{ list_issues [length="<integer_value>"]
[columns="<integer_value>"]
[constraints="<list_of_issue_constraints>"]
[order="<order_condition>"] }}
<list_of_instructions>
{{ /list_issues }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
<list_of_instructions> may contain any statement except: "set_language", "set_publication", "list_issues", "set_issue".
| <list_of_issue_constraints>= |
[<issue_constraint>] <list_of_issue_constraints>
| <issue_constraint> |
| <issue_constraint>= |
number<integer_operator> <integer_value>
|name <string_operator> <string_value>
|publish_date <date_operator> <date_value>
|publish_year <integer_operator> <integer_value>
|publish_month <integer_operator> <integer_value>
|publish_mday <integer_operator> <integer_value>
|<date_constraint> |
| <date_constraint>= |
year <integer_operator> <integer_value>
|mon_nr <integer_operator> <integer_value>
|mday <integer_operator> <integer_value>
|yday <integer_operator> <integer_value>
|wday <integer_operator> <integer_value>
|hour <integer_operator> <integer_value>
|min <integer_operator> <integer_value>
|sec <integer_operator> <integer_value> |
where year stands for year, mon_nr for month number (1..12), mday for month day (1..31), yday for year day (1..365), wday for week day (1..7), hour for hour, min for minute and sec for second.
Any parameter used in <list_of_issue_constraints> can only be used once.
| <order_condition>= |
byNumber desc|asc
|byName desc|asc
|byDate desc|asc
|byCreationDate desc|asc
|byPublishDate desc|asc |
Order conditions are self-explanatory; byDate and byCreationDate are aliases of byPublishDate.
Inside the List the following environment variables are modified:
- language: if not defined before list start
- publication: if not defined before list start
- issue
The environment is restored after the list ends.
Constraints:
Inside list_issues 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
- unset_issue
list_issues statement can not be used inside any other list statements.
List of Sections
Purpose:
Select the list of sections according to the given constraints and current environmental variables. The publication, language, issue and section variables may not be defined outside list_sections statement; inside the statement however, all these variables are defined. The code between "{{ list_sections }}" statement and "{{ /list_sections }}" is repeated for every section in the list.
Syntax:
{{ list_sections [length="<integer_value>"]
[columns="<integer_value>"]
[constraints="<list_of_section_constraints>"] }}
<list_of_instructions>
{{ /list_sections }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
<list_of_instructions> may contain any statement except: "set_language", "set_publication", "list_issues", "set_issue", "list_section", "set_section".
| <list_of_section_constraints>= |
[<section_constraint>] <list_of_section_constraints>
| <section_constraint> |
| <section_constraint>= |
name <string_operator> <string_value>
| number <integer_operator> <integer_value> |
Any parameter used in <list_of_section_constraints> can only be used once.
Inside list_sections, the data context is defined by the constraints applied to the current section for every processed line. The data context is restored after the list processing.
Constraints:
Inside list_sections 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
- unset_issue
- list_section
- set_section
- set_default_section
- unset_section
list_sections statement cannot be used inside list_articles, list_subtitles, list_search_results statements.
List of Articles
Purpose:
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 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.
Syntax:
{{ list_articles [length="<integer_value>"]
[columns="<integer_value>"]
[constraints="<list_of_article_constraints>"]
[ignore_issue="true"] [ignore_section="true"]
[ignore_language="true"]
[order="<order_condition>"] }}
<list_of_instructions>
{{ /list_articles }}
where
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
{{ list_articles length="10" columns="2" order="byPublishDate desc"}}
{{ if $campsite->current_list->column == "1" }}
left column
{{ /if }}
{{ /list_articles }}
- ignore_issue: list articles from all issues, not only from the environment issue; if the section was defined it will list only articles from the environment section
- ignore_section: list articles from all sections, not only from the environment section
- ignore_language: list articles in all languages; if the issue and section were defined in the environment it lists only articles belonging to the environment issue/section
<list_of_instructions> may contain any statement except those listed at the end of the page.
| <list_of_article_constraints>= |
[<article_constraint>] <list_of_article_constraints>
| <article_constraint> |
| <article_constraint>= |
name <string_operator> <string_value>
|number <integer_operator> <integer_value>
|keyword <string_value>
|OnFrontPage [<switch_operator> <switch_value>]
|OnSection [<switch_operator> <switch_value>]
|upload_date <date_operator> <date_value>
|publish_date <date_operator> <date_value>
|public <switch_operator> <switch_value>
|type <switch_operator> <article_type>
|[<article_type>] <article_type_attribute> <attribute_type_operator> <attribute_type_value>
|matchAllTopics
|matchAnyTopic
|topic is|not <string_value>
|reads <integer_operator> <integer_value>
|author <string_operator> <string_value>
|issue <integer_operator> <integer_value>
|section <integer_operator> <integer_value> |
Examples of constraints:
constraints="issue greater 10 issue smaller 20"
constraints="section greater_equal 40 section smaller 60"
- name, number, upload_date, publish_date are self explaining article attributes
- keyword: all articles containing the specified keyword (and respecting all the other constraints) will be in the list
- OnFrontPage: articles having "Show article on front page" flag in <⁞switch_operator> relation with <switch_value> will be selected; for details see Creating articles within a section
- OnSection: articles having "Show article on section page" flag in <switch_operator> relation with <switch_value> will be selected; for details see Creating articles within a section
- public: articles having "Allow users without subscription..." flag in <switch_operator> relation with <switch_value> will be selected
- type: only articles having the given time will be selected
- ... <article_type_attribute> ...: articles being of <article_type> and having <article_type_attribute> in <attribute_type_operator> relation with <attribute_type_value> will be selected; for details see "Article Types"
- matchAllTopics/matchAnyTopic: defines the behavior of the list when matching articles topics against the list of topics given as parameters:
- matchAllTopics will force the selection of articles that have all the given topics
- matchAnyTopic (default) will select articles that have at least one topic from the given topic list
- topic: if "is" operator is used, articles having specified topic in their list of topics will be selected; if "not" operator is uses articles not having specified topic in their list of topics will be selected
- reads: you can set constraints based on the number of readers that viewed this article since it was published
- author: you can list articles that have or don't have a certain author; e.g.: "author is John\ Doe" (the backslash is needed to escape the space character - see Language Elements; Conventions at the bottom of the page). The author attribute has a predefined value "__current"; when using this value the author will be filled in from the currently defined article. E.g.: "author is __current".
Note on author attribute: this works only in 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 etc.
Note on topics: If a certain topic was defined in the template environment by use of "set_topic" statement or URL parameter the list will change the behavior of articles list: only articles having that topic will be listed.
E.g.:
{{ 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.
| <order_condition>= |
byNumber desc|asc
|byName desc|asc
|byDate desc|asc
|byCreationDate desc|asc
|byPublishDate desc|asc
|byLastUpdate desc|asc
|byPopularity desc|asc
|byPublication desc|asc
|byIssue desc|asc
|bySection desc|asc
|byLanguage desc|asc
|bySectionOrder desc|asc
|byComments desc|asc
|byLastComment desc|asc
|
- byComments instructs the Campsite to list articles by the number of comments filed to each article.
- byLastComment will list articles ordered by the last article comment time.
- byDate is an alias of byCreationDate.
- The other order conditions are self-explanatory.
- The default order of articles in the list (if no order condition was set) is: first they are ordered by the issue number descending, then by the section number ascending and by the article order in the section ascending.
Note: ByComments and byLastComment only work in Campsite 3.2.2 and newer.
Note: byLastUpdate is implemented in Campsite 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.
Constraints:
Inside list_articles the following statements are forbidden:
- list_languages
- 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_articles statement cannot be used inside list_subtitles, list_search_results statements.
List of Article Attachments
Purpose:
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.
Syntax:
{{ list_article_attachments [length="<integer_value>"]
[columns="<integer_value>"]
[language="current"] }}
<list_of_instructions>
{{ /list_article_attachments }}
where
- all_languages: if true (default) the list will contain all article attachments independent of their language; if false, the list will contain only article attachments that have the language currently defined by the template environment.
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
- language="current": list only attachments that were set as available for all translations and available for the language currently set in the template environment
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_attachments
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.
Example:
{{ list_article_attachments }}
{{ if $campsite->current_list->at_beginning }}
<h4>Downloads:</h4>
{{ /if }}
<a href="/attachment/{{ $campsite->attachment->identifier }}">{{ $campsite->attachment->file_name }}</a> ({{ $campsite->attachment->size_kb }}kb)<br/>
{{ /list_article_attachments }}
Here is an example on how to use the attachment list to play a number of MP3-files:
{{ list_article_attachments }}
{{ if $campsite->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 }}
List of Article Comments
Purpose:
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 "{{ list_article_comments }}" statement and "{{ /list_article_commnets }}" is repeated for every comment in the list.
Syntax:
{{ 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 }}
where:
- ignore_language: list comments regardless of the comment language
- ignore_article: list comments for all articles, not only for the current article
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
Note on ignore_article: this option will force the list order to date ordering.
Note: ignore_language and ignore_article only work in Campsite 3.2.2 and newer.
| <order_condition>= |
byDate desc|asc
|default desc|asc |
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:
- root comment 1
- reply 1 (parent is root comment 1)
- reply 1_1 (parent is reply 1)
- root comment 2
- ...
The first element in the list is the first comment that was submitted, second is it's first reply (if 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.
Example:
{{ list_article_comments order="byDate desc" }}
Subject: {{ $campsite->comment->subject }}<br/>
Posted {{ $campsite->comment->submit_date }}
by <b>{{ $campsite->comment->reader_email }}</b>
<br/>
{{ $campsite->comment->content }}
<br/>
{{ /list_article_comments }}
|
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_comments
List of Article Images
Purpose:
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 "{{ list_article_images }}" statement and "{{ /list_article_images }} is repeated for every image in the list.
Syntax:
{{ list_article_images [length="<integer_value>"]
[columns="<integer_value>"] }}
<list_of_instructions>
{{ /list_article_images }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
Example:
{{ set_language name="Deutsch" }}
{{ set_publication name="fluter" }}
{{ unset_issue }}
{{ set_section number="67" }}
{{* show image with index number 1 (when attached to article) *}}
{{ list_articles length="3" constraints="type is themaprint" }}
{{ list_article_images }}
{{ if $campsite->article->image->article_index == 1 }}
<img src="../{{ $campsite->article->image->imageurl }}"
title="{{$campsite->article->name }}">
{{ /if }}
{{ /list_article_images }}
{{ /list_articles }}
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 image is set to the current element of the list. The environment context is restored after the list processing.
List of Article Topics
Purpose:
Create a list of topics attached to the article currently defined in the template environment. If the article was not set the list is empty. The topic parameter may not be defined outside list_article_topics statement; inside the statement however, this parameter is defined. The code between "{{ list_article_topics }}" statement and "{{ /list_article_topics }}" is repeated for every topic in the list.
Syntax:
{{ list_article_topics [length="<integer_value>"]
[columns="<integer_value>"] }}
<list_of_instructions>
{{ /list_article_topics }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
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_topics
Inside the list, the current topic is set to the current element of the list. The environment context is restored after the list processing.
List of Article Audio Attachments
Purpose:
Create a list of audio files 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_audio_attachments }}" statement and "{{ /list_article_audio_attachments }}" is repeated for every audio attachment in the list. The order of the audio attachments is the same as in the administration interface.
Syntax:
{{ list_article_audio_attachments
[length="<integer_value>"]
[columns="<integer_value>"] }}
<list_of_instructions>
{{ /list_article_audio_attachments }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
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_audio_attachments
Inside the list, the current audio attachment is set to the current element of the list. The environment context is restored after the list processing.
List of Search Results
Purpose:
Create a list of articles that match the search keywords inputted by the reader. The publication, language, issue, section, article variables may not be defined outside list_search_results statement; inside the statement however, all these variables are defined. The code between "{{ list_search_result }}" statement and "{{ /list_search_result }}" is repeated for every article in the list.
Syntax:
{{ list_search_results [length="<integer_value>"]
[columns="<integer_value>"]
[order="<order_condition>"] }}
<list_of_instructions>
{{ /list_search_result }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
<list_of_instructions> may contain any statement except: "set_language", "set_publication".
| <order_condition>= |
byDate desc|asc
|byCreationDate
|byPublishDate
|byNumber desc|asc
|byName desc|asc |
Order conditions are self-explanatory; byDate is an alias of byCreationDate. The default order of articles in the list (if no order condition was set) is: first they are ordered by the publication identifier ascending, then by the issue number descending, then by the section number ascending and by the article order in the section ascending.
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.
Constraints:
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 of Subtitles
Purpose:
Create a list of subtitles for the content of the article currently defined in the template environment. The article, if not specified somewhere else, is treated as group of paragraphs. The markup for a new paragraph is the subtitle. The code between "{{ list_subtitles }}" statement and "{{ /list_subtitles }}" is repeated for every subtitle in the list.
Syntax:
{{ list_subtitles [length="<integer_value>"]
[columns="<integer_value>"] }}
<list_of_instructions>
{{ /list_subtitles }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
<list_of_instructions> may contain any statement except: "set_language", "set_publication", "list_issues", "set_issue", "list_sections", "set_section", "list_articles", "set_article".
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.
Constraints:
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 of Subtopics
Purpose:
Create a list of subtopics of the topic currently set in the template environment. If the topic was not set it will generate the list of root topics. The topic parameter may not be defined outside the list statement; inside the statement however, this parameter is defined. The code between "{{ list_subtopics }}" statement and "{{ /list_subtopics }}" is repeated for every topic in the list.
Syntax:
{{ list_subtopics [length="<integer_value>"]
[columns="<integer_value>"]
[order="<order_condition>"] }}
<list_of_instructions>
{{ /list_subtopics }}
where:
- 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 intervals of elements to be displayed can be switched using has_previous_elements/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 would be 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.
<list_of_instructions> may contain any statement except those listed at the end of the page.
| <order_condition>= |
byNumber desc|asc
|byName desc|asc |
Inside the list, the data context is defined by the constraints applied to the current topic for every processed line. The data context is restored after the list processing.
Constraints:
Inside list_subtopics the following statements are forbidden:
- list_subtopics
- set_topic
- set_default_topic
- unset_topic