Output Parameters

This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.

Setting templates

By default, template parameters are assumed to be chunk names. But if a chunk name begins with "@", the initial word in the name of the template is checked against preset rules for loading templates. The following words are used as parameters for the selected rule:

  • @FILE - Load template from HTML file located in the assets/templates/ folder or a subfolder
  • @CHUNK - Normal loading of the template from a chunk
  • @TPL, @CODE - The parameter value is used as an inline template
  • @DOCUMENT, @DOC - Template is taken from the *content* field of the given document
  • @PLH, @PLACEHOLDER - The template is loaded from a global Evo placeholder
  • @CFG, @CONFIG, @OPTIONS - Template is taken from the global settings of the current Evo install
Note that even when the initial character is "@" and the template is empty after all the rules have been processed, there will be an attept to find the chunk using the full template name.

Placeholders

DocLister placeholders

  • table placeholder - the name of such a placeholder matches a table column name;
  • a virtual placeholder - available after an extender is launched or following computation within the controller;
  • a global placeholder - available from outside the templates fed to the snippet (usually with the prefix dl, which may be redefined using the sysKey or id parameters).
A DocLister extender is an auxiliary class for some kind of processing, and has nothing in common with Ditto extenders.

Table placeholders

The site_content table is used by default if the controller site_content or any extension of it is set. In the case of the onetable controller, the name of the table is defined by the table parameter. Thus it is possible to obtain a full list of placeholders by opening the MySQL table, using phpMyAdmin, for example, and seeing what fields that table has.

Virtual placeholders

Placeholders set by the paginate extender
[+id_parameter.pages+] Pagination
[+id_parameter.totalPages+] Total number of pages
[+id_parameter.isstop+] 1 if current page is the last
[+id_parameter.isstart+] 1 if current page is the first
Placeholders set by the jotcount extender
[+jotcount+] Number of comments from the Jot snippet
Placeholders set by the tv extender
[+tv.TV_name+] Template variable value.
The prefix "tv" is added to all TVs by default, but you can remove or redefine it using the tvPrefix parameter
Placeholders set by the e extender
[+e.fieldname+] Value of a field with entities for HTML special characters
Placeholders set by the summary extender
[+summary+] Page notes
Placeholders set by the user extender
[+summary+] Page notes
[+user.id+] User ID
[+user.username+] User login
[+user.fullname+] User fullname
[+user.role+] ID of user's role
[+user.email+] e-mail
[+user.phone+] Phone
[+user.mobilephone+] Mobile phone
[+user.blocked+] Blocked status
[+user.blockeduntil+] UNIX time user is blocked until
[+user.blockedafter+] UNIX time after which user will be blocked
[+user.logincount+] Total authorizations
[+user.lastlogin+] UNIX time of last authorization
[+user.thislogin+] UNIX time of current authorization
[+user.failedlogincount+] Number of failed login attempts
[+user.dob+] Date of birth
[+user.gender+] Gender
[+user.country+] Country
[+user.state+] Region
[+user.zip+] Postcode
[+user.fax+] Fax
[+user.photo+] Photo
[+user.comment+] Comment
Placeholders set in site_content controllers
[+title+] Document title for lists. `pagetitle` is used if `menutitle` is empty
[+iteration+] Sequence number of the item in the list
[+url+] Link to document
[+date+] Document publication date, formed according to the rules of the dateFormat parameter (default %d.%b.%y %H:%M). `server_offset_time` in the system settings is also taken into account.
[+sysKey_value.active+] Flag indicating whether the document is the one that called the snippet (1 = true, 0 = false)
[+sysKey_value.class+] Classes that may be automatically assigned to the document (first, last, current)
[+sysKey_value.wrap+] HTML list code generated for output to the user (only used for the ownerTPL template)

Placeholder-setting parameters

Parameter Description Values Default
sysKey Prefix for system placeholders
Output appears as [+sysKey<strong>.</strong>placeholder+]
String dl
id Prefix for local placeholders
Output appears as [+id<strong>.</strong>placeholder+]
String

Parameters for output to templates

Parameter Description Values Default
ownerTPL Wrapper template for the results list. If no relevant results are found, the result with the noneTPL template is also worked into this template. See description of the noneWrapOuter parameter for details. Template name following DocLister template setting rules
Example:
&ownerTPL=`@CODE:
<ul class="pages-list">
[+dl.wrap+]
</ul>`
tpl Template Name of a template given according to the DocLister template setting rules. The value of the parameter may be altered by a prepare snippet using features of $_DocLister->renderTpl.
Example:
&tpl=`@CODE:
<li>
<img src="[+tv.image+]" alt="[+e.pagetitle+]">
<a href="[+url+]">[+title+] ([+id+])</a>
</li>`
defined in the controller
tplId0, tplId1, ... tplIdN Template for format of blocks containing documents numbered 0, 1, 2 etc. Value of the tpl parameter
tplFirst Template for format of first block containing documents in the list. Synonymous with *tplId1* parameter, but has higher priority. Template name following DocLister template setting rules. If none given, same as tpl template.
tplLast Template for format of last block containing documents in the list Template name following DocLister template setting rules. If none given, same as tpl template.
tplCurrent Template for format of block containing current document in the list Template name following DocLister template setting rules. If none given, same as tpl template.
noneTPL Template containing message that no documents were found matching the given criteria Template name following DocLister template setting rules
noneWrapOuter Whether to wrap the noneTPL response in the ownerTPL template. Parameter is only relevant when there are no documents to form a list from, and ownerTPL has been set Template name following DocLister template setting rules

Pagination

There are as yet no placeholders to substitute data from language packages.
Parameter Description Values Default
paginate Paginate output. See placeholders generated by the paginate extender.
Offset
Ditto-style pagination
pages
pagination with splits
pages
TplNextP Template for "next page" link Template name following DocLister template setting rules
@CODE: <a href="[+link+]">' . $this->DocLister->getMsg('paginate.next', 'Next') . ' ></a>
TplPrevP Template for "previous page" link Template name following DocLister template setting rules
@CODE: <a href="[+link+]">< ' . $this->DocLister->getMsg('paginate.prev', 'Prev') . '</a>
TplPage Template for insertion of page number into the page list Template name following DocLister template setting rules
@CODE: <a href="[+link+]" class="page">[+num+]</a>
TplCurrentPage Template for format of current page in the page list Template name following DocLister template setting rules
@CODE: <b class="current">[+num+]</b>
TplWrapPaginate Wrapper template for paginated pages Template name following DocLister template setting rules
@CODE: <div class="[+class+]">[+wrap+]</div>
pageLimit Number of pages displayed in the page list Integer > 0 1
pageAdjacents Maximum pages to the left and right, relative to current page Integer > 0 4
PaginateClass Class for the container that will hold the paginated pages any string matching rules for HTML class attribute paginate
PrevNextAlwaysShow Always show "next page" and "previous page" 1, 0 0
TplNextI Template to insert inactive "next page" link, used in conjunction with PrevNextAlwaysShow Template name following DocLister template setting rules
@CODE: [%paginate.next%] >
TplPrevI Template to insert inactive "previous page" link, used in conjunction with PrevNextAlwaysShow Template name following DocLister template setting rules
@CODE: < [%paginate.next%]
TplDotsPage Template for the pagination gap Template name following DocLister template setting rules
@CODE: ...
noRedirect Bar redirection when non-existent page is requested 1, 0 0

Output to placeholders

Parameter Description Values Default
contentPlaceholder Insert document values into custom placeholders
When parameter is set to 1, DocLister creates placeholders such as [+id.item[x]+], where "x" is the sequence number of the document in the list, and "id" is the value of the id parameter
(see description of the id parameter).
0, 1 0

API mode

Parameter Description Values Default
api Produce output in JSON format 0, 1 or a list of fields from the selected documents 0
JSONformat Basis for formation of JSON response.
Using the old format, the response looks like a normal array. In the new format the response is wrapped into a `rows` section, with added ingredient `total` which indicates the total number in the selection
old, new old

Suggest an edit to this page.