{init_object}
3.3.15, 4.0.4
Tag {init_object} returns one CMS object of any type (class). Tag will load entire contents of the object and return info as elements. Element listing depends on the class where the current object belongs, for example document object has different elements than article object. Detailed information about article's elements can be found on SAPI reference page for {init_article}, about document's elements on page {init_document}, etc.
Parameters
- id - ID number of the object to return
- name - variable name where the returned data is saved. Default value is "object".
- buttons - defines which action buttons are displayed to the site editor. Values can be "new,edit,hide,move,delete".
Attributes
- id - ID number of the object.
- parent_id - ID number of parent object.
- href - link to the object detailed view, e.g. ?id= 368.
- title - title of the object.
- class - class name of the object.
- buttons - action-buttons, available only for editors.
- details_link - alias for attribute "href".
- details_title - link title to the object detailed view (system word).
- printgif - link to the print view of the object with small printer-icon.
- printlink - link to the print view of the object.
- <attribute> - attribute value for object, attribute name can be any information field existing for current class.
- 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
Additional attributes for section (3.3.17, 4.0.7 ):
- show_toolicons - 1 - if tools icons are visible, 0 - otherwise.
- is_mailinglist - 1 - if section is included in mailinglist, 0 - otherwise.
- show_subarticles - 1 - if subarticles are visible, 0 - otherwise.
- is_hided_in_menu - 1 - if section is hided in navigation menu, 0 - otherwise.
- show_date - 1 - if date is visible for articles, 0 - otherwise.
Additional attributes for album (4.5.3):
- title - album title.
- description - description of the album.
- thumbnail_size - size of thumbnail images, in pixels.
- image_size - size of images, in pixels.
- folder_id - images source folder ID.
- folder_path - images source folder path, eg "public/images".
Additional attributes for poll:
- is_open - 1 - if poll is not in archive, 0 - otherwise.
- is_voted - 1 - if user is voted, , 0 - otherwise.
- answers_count - the count of all poll's answers.
- answers - array of answers having elements:
"->answer" (same as "->title")
"->count" - voters - array of voters having elements:
"->id"
"->answer_id"
"->ip"
"->user_id"
"->user_firstname"
"->user_lastname"
"->time"
"->ftime"
Sample code for Polls
RSS