Themes

Lighthouse Keeper 1.1.1 added the ability to create themes for the ticket details view. Themes are simply HTML pages with a few special tags added to allow Lighthouse Keeper to replace them with data from the ticket.

Theme Basics

A theme at its most basic is a folder with the name THEME.lhktheme and containing a single HTML file called index.html. You can add any other files, such as images and style sheets to this folder, but the HTML must be contained within the index.html file.


Tagging basics

Lighthouse Keeper uses a set of special tags to insert ticket data into a theme. These are surrounded by curly braces, e.g. {title}. Some tags also have attributes, which are in the form: name=value and appear within the tag after the name. A small number of tags have open and closing tags. These tags are often used where there are multiple versions of that piece of data that Lighthouse Keeper will loop through. Any content placed within these tags will be duplicated on each pass and any tags within the content will be replaced with the appropriate data. Lastly, some tags can also be used in conditional statements, so you can have a default value shown if they don't exist. Conditionals are presented in the form:

{if TAG}
  Enter content here for if TAG is set
{else}
  Enter content here for if TAG is not set
{endif}

The {else} clause can be left out if you don't want to have any content if the value isn't set.


Tags

Below is a list of tags, any attributes they have and a description of what the tag is replaced by

{title}

Description: The title of the ticket.
Conditional?: NO
Attributes: None


{number}

Description: The ticket's number.
Conditional?: NO
Attributes: None


{state}

Description: The ticket's state.
Conditional?: NO
Attributes: None


{stateColour}

Description: The the colour of the ticket's state (doesn't include preceeding hash sign).
Conditional?: NO
Attributes: None


{body}

Description: The ticket's body.
Conditional?: YES
Attributes: None


{assignedTo}

Description: The name of the user the ticket is assigned to.
Conditional?: YES
Attributes: None


{milestone}

Description: The milestone the ticket is in.
Conditional?: YES
Attributes: None


{updatedAt}

Description: The the date the ticket was last updated.
Conditional?: NO
Attributes: format - The date format to use, in the Unicode standard.


{createdAt}

Description: The date the ticket was created.
Conditional?: NO
Attributes: format - The date format to use, in the Unicode standard.


{reportedBy}

Description: The name of the user who reported the ticket.
Conditional?: NO
Attributes: None


{tags}{/tags}

Description: The ticket's tags. Any content put between these tags will be duplicated for each tag.
Conditional?: YES
Attributes: None


{tag}

Description: The actual tag. This needs to be placed between a pair of "tags" tags.
Conditional?: NO
Attributes: None


{history}{/history}

Description: The ticket's history. Any content put between these tags will be duplicated for each ticket version.
Conditional?: YES
Attributes: None


{comment}

Description: The comment added to this version. This needs to be placed between a pair of "history" tags.
Conditional?: YES
Attributes: None


{posterName}

Description: The name of the person making the change and/or comment. This needs to be placed between a pair of "history" tags.
Conditional?: NO
Attributes: None


{date}

Description: The date of the change and/or comment. This needs to be placed between a pair of "history" tags.
Conditional?: NO
Attributes: None


{changes}{/changes}

Description: The changes between the current version and previous version. Any content put between these tags will be duplicate for each change. This needs to be placed between a pair of "history" tags.
Conditional?: YES
Attributes: None


{change}

Description: The actual change. This needs to be placed between a pair of "changes" tags.
Conditional?: NO
Attributes: None