Guides and Sample Code


Playground Book Format Reference

Linking to Terms

Add a link to the definition of a glossary term on a playground page. Use a glossary link when you introduce a new term and when you need to refer to a term that was defined earlier.

  • [link text](glossary://term key)

The link text is displayed as a link on the playground page. The term key is a Term Name Key for a glossary term in the Glossary.plist file.

Figure 14-1 shows a page from Learn to Code 1 that contains links to two glossary terms: commands and debugging.

Figure 14-1Glossary links on a playground page image: ../Art/SP_glossary_link_2x.png

Listing 14-1 shows the snippet of markup defining the glossary links shown in Figure 14-1. [commands](glossary://command) defines the link to the commands glossary term. [debugging](glossary://debug) defines the link to the debugging glossary term.

Listing 14-1Glossary link markup snippet
  1. /*:
  2. Figure out the shortest route for Byte to pick up the gem and toggle open the switch. You can use one or both of the portals, and you'll need to use the [commands](glossary://command) you've learned up to now. (You might need your [debugging](glossary://debug) skills, too!)
  3. */