0

Modules template variable reference

The following section is a reference to be used when building module templates. It lists modules and their associated content types, detailing the specific template variables which can be used.

News blog

News teasers

  • introduction
    String
    The introduction set in the site tree
  • news_blog_href
    String
    The relative path to the page containing the New blog content type
  • teasers
    Array
    An array where each element corresponds to a news teaser
    The following variables are available:
    • title
      String
      The title of the news blog
    • thumbnail
      String
      The path to the thumbnail which has been uploaded (this is empty if no file has been uploaded)
    • href
      String
      A link to the details page
    • summary
      String
      The blog post’s summary text
    • published_date
      Timestamp
      The date the blog was published in unix timestamp format
    • num_comments
      Integer
      The number of comments made on this blog post


News tags

  • introduction
    String
    The introduction set in the site tree
  • tags
    Array
    Each element in the array has three properties:
    • href
      String
      A link to a page in the news blog which lists other articles tagged with the same phrase.
    • tag
      String
      The tag itself
    • size
      Integer
      A value between 0 and 100 depending on how often the tag has been used. It can be used in conjunction with the font-size css attribute to resize tags based on their popularity.

News blog

This content type is large and complex, handling both the listing and details page of the news blog; because of this, the default template is split into multiple files. news_blog.twig.html works out whether to include news_blog/news_blog_listing.twig.html or news_blog/news_blog_details.twig.html

  • introduction
    String
    The introduction set in the site tree
  • listing
    Object
    Used in the listing view it has 3 properties:
    • articles
      Array
      Each element in the array represents an article.
    • paging
      Object
      The paging object is populated when there are too many articles to fit on the current page. Using these variables it’s possible to build previous/next buttons to allow a visitor to navigation between pages in the list view. It has the following properties:
      • total - Integer - The total number of news articles
      • max - Integer - The total number of pages
      • current - Integer - The current page the user is viewing
      • next - String - URL to the next page of results
      • previous - String - URL to the previous page of results
    • filters
      Object
      If the user has set the filters (filter by year, category) to appear in the site tree this object is populated with the HTML needed to display these features. It has the following properties:
      • categories - String - a HTML select menu listing the categories
      • years - String - A HTML select menu listing the years
  • details
    Object
    Used for the details page it holds the data for a single specific article.
    • title
      String
      The title of the news blog
    • thumbnail
      String
      The path to the thumbnail which has been uploaded (this is empty if no file has been uploaded)
    • href
      String
      A link to the details page
    • summary
      String
      The blog post’s summary text
    • full_article
      String
      The blog post’s body text
    • published_date
      Timestamp
      The date the blog was published in unix timestamp format
    • num_comments
      Integer
      The number of comments made on this blog post
    • download
      Object
      If a file has bene uploaded to this blog post this object contains properties (href, description, filesize, extension) which can be used to create a download link.
    • related_news.articles
      Array
      Each element in the array is an article which has been set as related to this one.
    • tags
      Array
      Each element in the array is a tag which has been assigned to this article. See the News tags content type for more information on this property.
    • comments
      Object
      This object currently has a single property, html, which outputs a pre-built HTML form to let visitors add comments about the blog post. In the future this object will be expanded to allow you to have more control over how the comments are formatted and displayed.

Quotes

Quote listing

  • introduction
    String
    The introduction set in the site tree.
  • quotes
    Array
    An array containing the quotes to be displayed. Each element has the following properties:
    • image
      String
      A file path to an image which has been uploaded.
    • summary
      String
      A summary of the full quote
    • quote
      String
      The full text of the quote
    • author
      String
      The name of the author
    • authors_title
      String
      The job title of the author
    • published_date
      Timestamp
      The date the quote was made
    • website
      Object
      An object with two properties, href and rel. If an external link has been set rel is populated with the string ‘external’.
    • company_name
      String
      The company name

Quote teasers

  • introduction
    String
    The introduction set in the site tree.
  • quote_list_href
    String
    The relative path to the page containing the Quote listing content type
  • quotes
    Array
    An array containing the quotes to be displayed. Each element has the following properties:
    • image
      String
      A file path to an image which has been uploaded.
    • summary
      String
      A summary of the full quote
    • quote
      String
      The full text of the quote
    • author
      String
      The name of the author
    • authors_title
      String
      The job title of the author
    • published_date
      Timestamp
      The date the quote was made
    • website
      Object
      An object with two properties, href and rel. If an external link has been set rel is populated with the string ‘external’.
    • company_name
      String
      The company name

FAQ

Question and answer list

  • introduction
    String
    The introduction set in the site tree.
  • category_select
    String
    An HTML select menu which lists the categories set in the site tree.
  • faqs
    Array
    Each element in the array corresponds to an faq and has the following properties:
    • question
      String
      The FAQ’s question.
    • answer
      String
      The FAQ’s answer text.

Site manager

Block quotation

  • quote
    String
    The full text of the quote.
  • author
    String
    The name of the author.
  • author_title
    String
    The job title of the author.
  • company_url
    String
    A link the company’s website.
  • company_name
    String
    The company name.

Button

  • alt
    String
    Alt text for the button image.
  • align
    String
    A class to be assigned to indicated if the button should be left or right aligned.
  • href
    String
    The URL the button links to.
  • target
    String
    If the link is external then this will contain the value ‘external’.
  • link_text
    String
    The text to be used inside the button

Clear

This content type has no template variables

Form

  • form_html
    String
    The HTML output from the form set in the backend of the system. We reccomend you read the section on forms and form validation in further detail.

Global content

  • global_content
    String
    The HTML output from the other content types

Link to top of page

  • link_text
    String
    Text to be used in the link to the top of the page

Navigation menu

  • introduction
    String
    The introduction set in the site tree.
  • navigation
    String
    Outputs a nested <ul> list structure. The HTML which is output contains additional classes to help style selected pages and parents.

Script

  • script
    String
    The script (Javascript / CSS / HTML) to be output to the page.

Text editor

  • text
    String
    The contents of the WYSIWYG editor to be output to the page.

Staff listing

Staff list

  • introduction
    String
    The introduction text set in the site tree.
  • category
    Array
    Each element in the array is an object with the following properties:
    • id
    • title
    • staff
  • staff
    Array
    Each element in the array is an object with the following properties:
    • href
    • full_name
    • photo
    • role
    • telephone
    • fax
    • email
    • vcard

Staff search

  • introduction
    String
    The introduction text set in the site tree.
  • specialist_areas
    Array
    An array where each item is a string containing the name of a specialist area.
  • alphabet
    String
    A <ol> list which lists the characters of the alphabet. If a staff member’s surname begins with that letter then it’s presented as a link.

Advertising

Adverts

  • advert.id
    Integer
  • advert.advert
    String
  • advert.title
    String
  • advert.link
    Link

Documents

Download

  • document.id
    Integer
  • document.href
    String
  • document.link_text
    String
  • document.file_ext
    Link
  • document.file_size
    Link
  • document.description
    Link

Glossary

Display

  • alphabet
    Array
    An array of letters from A-Z including the # character.
  • letters
    Array
    An associative array where the key is the letter and the value is the definition

Players

Players listing

  • introduction
    String
    The introduction text set in the site tree.
  • player
    Object
    Only populated on the details page. Contains the following properties:
    • first_name
    • last_name
    • photo
    • date_of_birth
    • height
    • weight
    • position
    • honours
    • sponsors
    • full_details
  • players
    Array
    An array containing player objects. Only populated on the listing page.
  • letters
    Array
    An array containing the initial letter of every player in the system. Useful for building a search feature.

Players teaser

  • introduction
    String
    The introduction text set in the site tree.
  • players
    Array
    An array of player objects. Each item contains the following properties:
    • first_name
    • last_name
    • photo
    • date_of_birth
    • height
    • weight
    • position
    • honours
    • sponsors
    • full_details

Movies

Movie player

  • movie.id
    Integer
    The movie’s database ID.
  • movie.width
    Integer
    Desired width of the movie player in pixels.
  • movie.height
    Integer
    Desired width of the movie player in pixels.
  • movie.upfile
    String
    URl to the uploaded movie file.
  • movie.autoplay
    Boolean
    True if autoplay option is checked in site tree, otherwise is false.

Listings

Listings list

  • introduction
    String
    The introduction text set in the site tree.
  • category_select
    String
    The HTML for the drop down which changes the selected category.
  • rows
    Array
    An array of objects. Each item contains the following properties:
    • logo
    • link
    • title
    • description

Images

Display image

  • image.id
    Integer
    The images unique database ID.
  • image.link
    Object
    A link object.
  • image.upfile
    String
    File path to the uploaded image
  • image.alt
    String
    Alt set set by the user in the site tree
  • image.caption
    String
    Caption text set by the user in the site tree

Featured images

  • images
    Array
    Each item in the array is a object with the following properties:
    • title
    • upfile
    • website
    • description

Film strip

  • introduction
    String
    The introduction text set in the site tree.
  • category_select
    String
    The HTML for the drop down which changes the selected category.
  • images
    Array
    Each item in the array is a object with the following properties:
    • short_title
    • upfile
    • website
    • description

Image grid

  • introduction
    String
    The introduction text set in the site tree.
  • images
    Array
    Each item in the array is a object with the following properties:
    • title
    • upfile
    • website
    • description

Photo panel

  • images
    Array
    Each item in the array is a object with the following properties:
    • title
    • upfile
    • website
    • description

Randomiser

  • introduction
    String
    The introduction text set in the site tree.
  • static
    Boolean
    True if the user hasn’t set the randomiser to animate in the site tree options.
  • images
    Array
    Each item in the array is a object with the following properties:
    • title
    • upfile
    • website
    • description

Fixtures

Fixtures list

  • introduction
    String
    The introduction text set in the site tree.

Fixtures teaser

  • introduction
    String
    The introduction text set in the site tree.

Basket

View basket

Buy now

Basket summary

Products

Product listing

  • introduction
    String
    The introduction text set in the site tree.

All products

  • introduction
    String
    The introduction text set in the site tree.

Category listing

Calendar

Calendar list

  • introduction
    String
    The introduction text set in the site tree.

Calendar teaser

  • introduction
    String
    The introduction text set in the site tree.

Dynamic header

Image header

  • introduction
    String
    The introduction text set in the site tree.
  • images
    Array
    An array of objects. Each object has the following properties:
    • title
    • link
    • image
    • summary

Registrants

This module has not yet been converted to use the new template format.

Messaging

This module has not yet been converted to use the new template format.

0 comments

Post is closed for comments.