401-article list.lite.mdl
From Cyclone3 Wiki
Standard article list with paging
Input parameters
abstract.ignore.img.1
- description:
- format: 1/0
- default: 0
article[.linenumber][.abstract].a501_image_file.ID_format
- description: (specific article line's) image format ID
- format: image format ID
- default: default thumbnail format ID, usually 3
article[.linenumber][.abstract].a501_image_file.ID_format.1
- description: (specific article line's) first image format ID
- format: image format ID
- default: default thumbnail format ID, usually 3
article[.linenumber][.abstract].a510_image_file.ID_format
- description: (specific article line's) video preview image format ID
- format: image format ID
- default: default thumbnail format ID, usually 3
article[.linenumber][.abstract].a510_image_file.ID_format.1
- description: (specific article line's) first video preview image format ID
- format: image format ID
- default: default thumbnail format ID, usually 3
a501_image_file.ID_format.extra
- description: extra image format ID, used ie. for javascript lightbox implementation
- format: image format ID
- default: default fullsize format ID, usually 2
article_content.lng
- description: content language
- format: en
- default: lng parameter value
article_attrs.status
- description: non-separated list of status values
- format: Y[ND]
- default: Y
world_status
- description: world status values
- format: Y[ND]
- default: Y/NULL
article_attrs.ID_category
- description: ;-separated article category ID list, asterisk symbolizes recursion
- format: ID[*][,ID[*]] ... [,ID[*]]
- default:
article.ID
- description: ;-separated article ID_entity list
- format: ID[,ID] ... [,ID]
- default:
article.ID_entity
- description: ;-separated article ID_entity list
- format: ID_entity[,ID_entity] ... [,ID_entity]
- default:
body.ignore.img
- description:
- format: 1/0
- default: 0
db_name
- description: database name
- format: domain_tld
- default: domain's default database
hyphen
- description: transform specified database fields into hyphenized version
- format: abstract[;body]
- default:
ignore.img
- description:
- format: 1/0
- default: 0
ignore.img.1
- description:
- format: 1/0
- default: 0
relation
- description: process related content (articles) for each item
- format: 1/0
- default: 0
sql_limit
- description: count of items in list, with defined offset
- format: pagecount[,pageoffset]
- default: 1
sql_where
- description: user-defined sql constraints
- format: sql statement
- default: 1
sql_order_by
- description: world status values
- format: sql statement
- default: article_attrs.datetime_start DESC
Output templates
Default output
- definition: TMP
- description: mandatory.
- example
<DEFINITION id="TMP"> Article list:<br /> First article in list:<br /> <#item.1#> Other articles:<br /> <ul> <#item#> </ul> <#previous#> <#next#> </DEFINITION>
<#item[.linenumber]#> | Placeholder for item template, or item with specific ordinal |
<#paging#> | Placeholder for paging template |
<#previous#> | Placeholder for previous template |
<#next#> | Placeholder for next template |
<%total_count%> | Total count of displayed items |
<%category_name%> | Article category name (only replaced, when a single category ID or ID with asterisk is specified |
<%category_name_url%> | Article category name (only replaced, when a single category ID or ID with asterisk is specified |
List item template
- definition: item
- description: mandatory. default list item template.
- variations:
- item.linenumber - overrides both default and odd line templates, 1-based
- item.odd - overrides default line template for odd line number items
- item-empty - overrides all item templates when neither article body, nor article abstract is available
- item-emptybody - overrides all item templates when article body is not available
- example:
<DEFINITION id="item"> <li> <#gallery_mark#><#rating_top_mark#><#video_mark#> <a href="?|?type=article_view&ID=<%db_ID_entity%>&name_url=<%db_name_url%>"> <%db_name%><br /> </a> <%db_abstract%><br /> </li> <#item#> </DEFINITION> <DEFINITION id="item.1"> Our latest article:<br /> <a href="?|?type=article_view&ID=<%db_ID_entity%>&name_url=<%db_name_url%>"> <%db_name%><br /> </a> <%db_abstract%><br /> </DEFINITION>
<#item#> | Placeholder for the following item. If it doesn't exist, only the first item will be inserted into the main template and further items won't be. |
<#gallery_mark#> | Placeholder for gallery_mark template |
<#video_mark#> | Placeholder for video_mark template |
<#rating_top_mark#> | Placeholder for rating_top_mark |
<%db_name%> | Item's name |
<%db_name_url%> | Item's name in url format |
<%db_abstract%> | Item's processed abstract |
<%db_alias_url%> | Item's alias url (editable in article editor's Details tab) |
<%body%> | Item's processed body |
<%item_number%> | Article list item ordinal |
<%alias_url%> | Article category's alias url. If the first parent category's alias url is not specified, the function bubbles up until a category with an alias url specified is found. If no parent category has an alias url, defaults to $tom::H_www |
<%alias_url_db%> | Same as alias_url, without fallback to $tom::H_www. |
<%db_abstract_plain%> | Item's abstract cleaned of html tags |
<%datetime_create.variable%> | Publishing start date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec |
<%datetime_change.variable%> | Publishing start date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec |
<%datetime_start.variable%> | Publishing start date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec |
<%datetime_end.variable%> | Publishing start date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec |
<%author_variable%> | Article author's info: name, surname, title, ... |
<%editor_variable%> | Article editor's info: name, surname, title, ... |
[abstract/body.]a210_page
- description: inline (abstract) sitemap link template
[abstract/body.]a401_article
- description: inline (abstract) article link template
[abstract/body.]a501_image
- description: inline (abstract) image template
[abstract/body.]a501_image.1
- description: inline (abstract) first image template
[abstract/body.]a510_video
- description: inline (abstract) video template
[abstract/body.]a510_video.1
- description: inline (abstract) first video template
[abstract/body.]a510_video_part
- description: inline (abstract) video part template
[abstract/body.]a510_video_part.1
- description: inline (abstract) first video part template
video_mark
- description: template for signalling that article item contains video/video part
- example
<span class="mark_video"> <img src="<$tom::H_grf>/icons/video.jpg" /> </span>
rating_top_mark
- description: template for signalling top-rated article item
- example
<span class="mark_top"> <img src="<$tom::H_grf>/icons/hand_up.jpg" /> </span>
gallery_mark
- description: template for signalling that article item contains gallery
- example
<span class="mark_gallery"> <img src="<$tom::H_grf>/icons/photo.jpg" /> </span>
related_article[.relateditemnumber]
- description: template for related articles, you can use the same output as with the article list item template
- example
<a href="?|?type=article_view&ID=<%db_ID%>&name=<%db_name_url%>"> <%db_name%> </a> <#related_article#>
paging
- description: template for paging, replaced when more items are available, or page offset is not 0
- example
<DEFINITION id="paging"> <div class="paging"> <#previous#><#next#> </div> </DEFINITION>
next
- description: template for next listing page link
- example
<DEFINITION id="next"> <a href="?|?|offset=<%offset%>">older articles</a> </DEFINITION>
previous
- description: template for previous listing page link
- example
<DEFINITION id="previous"> <a href="?|?|offset=<%offset%>">newer articles</a> </DEFINITION>
TMP_failure.empty
- description: template used, when no article items are available
- example
<DEFINITION id="TMP.empty"> Article list:<br /> Sorry, no articles are available in this section. </DEFINITION>