Developer guides
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
- Quotes
- FAQ
- Site manager
- Staff listing
- Advertising
- Documents
- Glossary
- Players
- Movies
- Listings
- Images
- Fixtures
- Basket
- Products
- Calendar
- Dynamic header
- Registrants
- Messaging
News blog
News teasers
introduction
String
The introduction set in the site treenews_blog_href
String
The relative path to the page containing the New blog content typeteasers
Array
An array where each element corresponds to a news teaser
The following variables are available:title
String
The title of the news blogthumbnail
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 pagesummary
String
The blog post’s summary textpublished_date
Timestamp
The date the blog was published in unix timestamp formatnum_comments
Integer
The number of comments made on this blog post
News tags
introduction
String
The introduction set in the site treetags
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 itselfsize
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 treelisting
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 articlesmax- Integer - The total number of pagescurrent- Integer - The current page the user is viewingnext- String - URL to the next page of resultsprevious- 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 categoriesyears- 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 blogthumbnail
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 pagesummary
String
The blog post’s summary textfull_article
String
The blog post’s body textpublished_date
Timestamp
The date the blog was published in unix timestamp formatnum_comments
Integer
The number of comments made on this blog postdownload
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 quotequote
String
The full text of the quoteauthor
String
The name of the authorauthors_title
String
The job title of the authorpublished_date
Timestamp
The date the quote was madewebsite
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 typequotes
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 quotequote
String
The full text of the quoteauthor
String
The name of the authorauthors_title
String
The job title of the authorpublished_date
Timestamp
The date the quote was madewebsite
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:idtitlestaff
staff
Array
Each element in the array is an object with the following properties:hreffull_namephotoroletelephonefaxemailvcard
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
Integeradvert.advert
Stringadvert.title
Stringadvert.link
Link
Documents
Download
document.id
Integerdocument.href
Stringdocument.link_text
Stringdocument.file_ext
Linkdocument.file_size
Linkdocument.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_namelast_namephotodate_of_birthheightweightpositionhonourssponsorsfull_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_namelast_namephotodate_of_birthheightweightpositionhonourssponsorsfull_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:logolinktitledescription
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 imageimage.alt
String
Alt set set by the user in the site treeimage.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:titleupfilewebsitedescription
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_titleupfilewebsitedescription
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:titleupfilewebsitedescription
Photo panel
images
Array
Each item in the array is a object with the following properties:titleupfilewebsitedescription
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:titleupfilewebsitedescription
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:titlelinkimagesummary
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.
Is this page incomplete?
This documentation is in development.
If you cannot find what you are looking for then please contact us and we will try and prioritise the content for you.