Cyclone3 Skin

730-event list.lite.mdl

From Cyclone3 Wiki

Standard event list with paging

Contents

Input parameters

db_name

  • description: database name
  • format: domain_tld
  • default: domain's default database

date

  • description: load only actual events (started before, ending after the date)
  • format: YYYY-MM-DD HH:SS
  • default:

event.ID

  • description: ;-separated event ID list
  • format: ID[;ID] ... [;ID]
  • default: $env{'lng'}

event_cat.ID_entity

  • description: ;-separated event category ID list, asterisk symbolizes recursion
  • format: ID[*][;ID[*]] ... [;ID[*]]
  • default:

event_lng.lng

  • description: event language
  • format: standardized 2-character language code
  • default: $env{'lng'}

event.status

  • description: non-separated list of status values
  • format: Y[ND]
  • default: Y

mode

  • description: listing mode
  • format: future|past
  • default: future

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_where.name

  • description: search term for event name
  • format: string
  • default:

sql_order_by

  • description: world status values
  • format: sql statement
  • default: event.datetime_start ASC

thumbnail.image_format.ID

  • description: event thumbnail image format ID
  • format: image format ID
  • default: default thumbnail format ID, usually 3

Output templates

Default output

  • definition: TMP
  • description: mandatory.
  • example
<DEFINITION id="TMP">
 Event list:<br />

 First event in list:<br />
<#item.1#>
 
 Other events:<br />
 <ul>
<#item#>
 </ul>

<#previous#> <#next#>
</DEFINITION>
Replaced gateways and variables
<#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%> File category name (only replaced, when a single category ID or ID with asterisk is specified)
<%category_name_url%> File 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
  • example:
<DEFINITION id="item">
  <li>
<#thumbnail#>
   <a href="?|?type=event_view&ID=<%db_ID_entity%>&name_url=<%db_name_url%>">
    <%db_name%><br />
   </a>
   <span>Date: <%db_datetime_start.mday%>.<%db_datetime_start.month%>.<%db_datetime_start.year%><br /></span>
   <%description_short%><br />
  </li>
<#item#>
</DEFINITION>

<DEFINITION id="item.1">
<#thumbnail#>
   <a href="?|?type=event_view&ID=<%db_ID_entity%>&name_url=<%db_name_url%>">
    <%db_name%><br />
   </a>
   <span>Date: <%db_datetime_start.mday%>.<%db_datetime_start.month%>.<%db_datetime_start.year%><br /></span>
   <%description_short%><br />
Replaced variables
<#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.
<#link#> Placeholder for link template
<#thumbnail#> Placeholder for thumbnail template
<%db_name%> Item's name
<%db_name_url%> Item's name in url format
<%db_name_long%> Item's long name (ie. when name is "ITWorld", this could be "Latest IT trends expo")
<%db_price%> Item's fee
<%db_price_incl_VAT%> Item's fee including tax
<%db_link%> Item's link (ie. to external site with more information)
<%db_location%> Item's location
<%organizers%> Item's organizers list
<%db_description_short%> Item's short description (abstract)
<%db_description%> Item's description (main body) unformatted, raw db data
<%description%> Item's description, formatted
<%description_plain%> Item's description in plaintext format
<%metasection::metakey%> Item's metadata values, ie. <%Processor::rate%> would output the value of 'rate' key in metadata's 'Processor' section.
<%item_number%> Event list item ordinal
<%datetime_start.variable%> Event start date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec, wday, wday.name, wday.name.long
<%datetime_finish.variable%> Event finish date values. Available variables: year, month, month.name, month.name.long, mday (month day), hour, min, sec, wday, wday.name, wday.name.long

thumbnail

  • description: template for event thumbnail
  • example
<DEFINITION id="thumbnail">
<img src="<$tom::H_a501>/image/file/<%db_file_path%>" align="left"/>
</DEFINITION>

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 events</a>
</DEFINITION>

previous

  • description: template for previous listing page link
  • example
<DEFINITION id="previous">
<a href="?|?|offset=<%offset%>">newer events</a>
</DEFINITION>

TMP.empty

  • description: template used, when no event items are available
  • example
<DEFINITION id="TMP.empty">
 Event list:<br />

 Sorry, no events are available in this section.
</DEFINITION>

Examples and notes