Scoreline graphic: Part 2

Creation of the Reference Hooks: 'All Teams' & 'All Players' and hooks to produce the scores for the 'Home Team' & 'Away Team'

Caveat: You need to have Template Editor permissions. It may be sensible when naming new hooks, new templates or new template sets to add "TRAINING" as part of the name, to differentiate your work from 'live' production work. Do consider any 'Delete' actions carefully - is it your work you are deleting?


Reference Hooks


You need two hooks for converting the codes for the players into their names and the codes for the teams into their names.


All Teams


Using Ignition Post Win Client as a Template Editor.


  1. Select the main tab DATA

  2. Select the sub-tab SCHEMAS & HOOKS

  3. Below SCHEMAS:

    1. Data Provider: XMLTeam

    2. Target: Production

    3. Schema: soccer event-report

    4. Sample Data: Southampton v Leicester City

  4. Using the 'sports-content.sports-event.team' node, create a hook at the parent level

    1. Rename 'All Teams'

  5. With 'All Teams' selected

    1. Expand the nodes 'team-metadata' and 'name'

    2. Highlight 'team.team-metadata.name.full'

    3. Click 'Create a new hook into this element next to or below All Teams'

    4. Rename: Full Team

  6. Create a second hook to 'team.team-metadata.name.full'

    1. Rename: Full Team Abbr

    2. In Hook Properties apply the Lookup 'PL_18_19_Fixture_Abbreviated' and select 'Abbr'

  7. Highlight 'team.team-metadata.team-key'

    1. Click 'Create a new hook into this element next to or below All Teams'

    2. Add the following 'Transform Steps':

    3. 'Skip 'N' Chars', where 'N' = 4

  8. Create a second hook to 'team.team-metadata.team-key'

    1. Rename: Team Key Abbr

    2. In Hook Properties apply the Lookup 'PL_18_19_Fixture_Abbreviated' and select 'Abbr'

    3. Add the following 'Transform Steps':

    4. 'Skip 'N' Chars', where 'N' = 4


Whilst selecting the 'Lookup' and populating the adjacent field (known as the 'Key' column), you may have noticed there was also the option below 'Lookup' called 'Fallbacks' with two buttons:

  • Add Fallback to Lookup

  • Add Fallback to Hook


What does it mean? Well, if the Lookup information does not contain information in the 'Key' column to match, then it cannot provide the corresponding information from the chosen 'Key' - in this instance 'Abbr'. These two buttons provide ways to deal with this.


Examining this instance


Question - What happens if the name of the team being provided by XMLTeam or by your chosen sample data does not appear in the Lookup - with a corresponding 'Key' i.e. 'Abbr' (e.g. Trumpton FC)? Answer - The data in its original form being provided by XMLTeam or by your chosen sample data is simply provided. You could set an alternate Lookup as the 'Fallback' or you could set the 'Fallback' to use data from an alternate hook.


All Teams - Continued


  1. Ensure the 'All Teams' hook is selected, click 'Create a new hook into this element next to or below All Teams' using the following nodes:

    1. team.id

    2. team.associate.associate-metadata.name.full

    3. team.associate.associate-metadata.position

    4. team.team-metadata.alignment

  2. Ensure 'All Teams' is selected

    1. Set List Key = 'Id'

    2. Add a constraint, as follows:

    3. team.team-metadata.alignment

    4. = * (Text)


The below image shows the hooks created so far:


Scoreline graphic: Part 2


Now make a couple of the sub-hooks more meaningful by renaming more appropriately.


  1. Rename 'Position' to: Associate Position

  2. Rename 'Full' to: Associate Full


All Players


  1. Collapse all the nodes within the 'team' node and then expand as follows:

    1. player

    2. player-metadata

    3. name


Scoreline graphic: Part 2


  • Using the 'player' node, create a hook at the parent level

    1. Rename to: All Players

  • With 'All Players' selected, click 'Create a new hook into this element next to or below All Players' using the following nodes:

    1. player.player-metadata.name.last

    2. player.player-metadata.player-key

    3. player.player-metadata.uniform-number

    4. player.player-metadata.position-regular


    (For more on Composite Hooks and Formats, see the main Ignition Help files.)

  • With 'All Players' selected

    1. Click 'Add Composite Hook'

    2. Rename: Index of Count

    3. Set the 'Composite Mode' to: Format String

    4. Set the 'Format' to: {0} of {1}

    5. Add the following component hooks:

    6. All Players.Index

    7. All Players.Count

  • With 'All Players' selected

    1. Set List Key = 'Player Key'


    Scoreline graphic: Part 2


    Tip. If you hover the mouse over the grey icon adjacent to the name of the hook it displays: ‘Multi-Select List’


    Hooks to produce a Score


    Now you have created the hooks necessary to do referencing, you will now create some hooks to extract a score at full-time and a score at half-time for both the home team and the away team. You need to be careful to ensure you are using the correct node during this stage of the tutorial - there are two nodes named 'score'.


    1. Collapse the schema to the 'team' node

    2. Expand 'team-metadata'

    3. Expand 'team-stats' and 'sub-score'


    Home Team


    Firstly, you will create the parent hook for the home team and its required sub-hooks and then following similar actions, you will create hooks for the away team.


    1. Using the 'team' node, create a hook at the parent level

      1. Rename: Home Team

    2. Ensure 'Home Team' is selected

      1. Click 'Create a new hook into this element next to or below Home Team' adjacent to the node: team.id'

    3. Click 'Create a new hook into this element next to or below Home Team' adjacent to the node: team.team-stats.score

      1. Rename: Home FT

    4. Click 'Create a new hook into this element next to or below Home Team' adjacent to the node: team.team-stats.sub-score.score

      1. Rename: Home HT

      2. Add a constraint, as follows:

      3. team.team-stats.sub-score.period-value

      4. <= 1 (number)

    5. With 'Home Team' selected

      1. Set the 'Select Mode' to: Single Item (first in list)

      2. Add a constraint:

      3. team.team-metadata.alignment

      4. = home (text)


    Away Team


    1. Using the 'team' node, create a hook at the parent level

      1. Rename: Away Team

    2. With 'Away Team' selected

      1. Click 'Create a new hook into this element next to or below Away Team' adjacent to the node: team.id

    3. Click 'Create a new hook into this element next to or below Away Team' adjacent to the node: team.team-stats.score

      1. Rename: Away FT

    4. Click 'Create a new hook into this element next to or below Away Team' adjacent to the node: team.team-stats.sub-score.score

      1. Rename: Away HT

      2. Add a constraint, as follows:

      3. team.team-stats.sub-score.period-value

      4. <= 1 (number)

    5. With 'Away Team' selected

      1. Set the 'Select Mode' to: Single Item (first in list)

      2. Add a constraint, as follows:

      3. team.team-metadata.alignment

      4. = away (text)


    Scoreline graphic: Part 2


  • Rename 'Home FT' to: Home FT Score

  • Rename 'Home HT' to: Home HT Score

  • Rename 'Away FT' to: Away FT Score

  • Rename 'Away HT' to: Away HT Score


  • Your next tutorial is:

    Scoreline graphic Part 3