init_albums
Tag {init_albums} allows developers to create picture albums
Parameters
- parent - section ID where to get the albums. If parent is not defined then current page ID is used.
- name - variable name where the returned data is saved. Default value is "albumlist".
- metadata - defines the metadata ID. Only used when metadata sets exist in a database.
This functionality is deprecated in version 4, please use profiles instead. - start - the starting row number to return.3.3.3
- limit - the number of rows to return. You must use this parameter always with "start" parameter. 3.3.3
- order - field name asc|desc.3.3.3
- position - position number in the page, default value: 0. 3.3.3
- where - additional filtering criteria using WHERE SQL syntax. 3.3.3
- on_create - allows to publish all objects immediately. If the parameter has value "on_create=publish", then a created object is published immediately. Default value is "hide". 4.0.2
- thumbnail_type - how an intro-thumbnail image is chosen. Possible values are: first, random. Default value is "first". 4.0.7
Attributes
- id - album ID number
- parent_id - ID number of parent object
- href -the link to album detailed view, e.g. ?id=368. 3.3.3
- title - the title of the album. 3.3.3
- is_selected - value in case of active article equals 1, else 0. 3.3.3
- buttons - action-buttons, available only for editors. 3.3.3
- date - the date of the album. 3.3.3
- fdate - the date of the album in format YYYY-MM-DD . 3.3.3
- datetime - date and time of the album format dd.mm.yyyy hh:mm. 4.4.1
- fdatetime - date and time of the album in database format, eg yyyy-mm-dd hh:mm:ss. 4.4.1
- details_link - equals to "href" . 3.3.3
- details_title - the link title to album detailed view (system word).
- last_modified - the objects last modified time. 3.3.3
This functionality is deprecated in version 4, please use changed_time instead. - flast_modified - the objects last modified time in format YYYY-MM-DD. 3.3.3
This functionality is deprecated in version 4, please use fchanged_time instead. - class - class name of the object
- created_user_id - user ID who initially created the object. 4.0.3
- created_user_name - user full name who initially created the object. 4.0.3
- changed_user_id - user ID who made the last object saving. 4.0.3
- changed_user_name - user full name who made the last object saving. 4.0.3
- created_time - creating time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fcreated_time - creating time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- changed_time - last saving time of the object in format dd.mm.yyyy hh:ii. 4.0.3
- fchanged_time - last saving time of the object in database default format, eg yyyy-mm-dd hh:ii. 4.0.3
- comment_count - the number of comments. 4.0.6
- last_commented_time - the last comment time in format dd.mm.yyyy hh:ii. 4.0.6
- description - description of the album 4.0.7
- thumbnail - relative path to the first/random thumbnail image in album 4.0.7
- thumbnail_size - size of thumbnail images, in pixels 4.2.1
- image_size - size of images, in pixels 4.2.1
- folder_id - images source folder ID 4.2.1
- folder_path - images source folder path, eg "public/images" 4.2.1
General tags
- <name>_newbutton - prints "New" action-button for creating a new object.
- <name>_count - the number of returned objects. If parameter "limit" is set then count equals to "limit" value.
- <name>_rows - alias for <name>_count
- <name>_counttotal - the total number of objects found, not affected by "limit" parameter. 3.3.7
Examples
{init_albums name="albums" thumbnail_type="first"}
{foreach from=$albums item="album"}
<h1>{$album->buttons}<a href="?id={$album->id}">{$album->title}</a></h1>
<a href="?id={$album->id}"><img src="{$album->thumbnail}"></a><br>
{$album->description}
{foreachelse}
{$albums_newbutton}
{/foreach}
RSS