...Processing...
error
big error
Using short codes at TutnIQ - TutnIQ
Table of contents X
  • Information boxes, spoilers and jump codes

    In this section we will learn how to use the information box, spoiler and jump shortcodes.

  • Information boxes

    An information box can be used to draw attention to particular information, for example:

    This is an information box!

    It can contain markdown, for example:

    • A list item
    • Another list item

    A block quote!

    The markup for the above information box:

    [note]
      This is an information box!
    
       It can contain markdown, for example:
    
        - A list item 
        - Another list item
    
        >A block quote!
    [/note]
    

    This is very similar to the 6-hash header discussed in our Markdown tutorial, but can include Markdown elements like links, lists and block quotes. It can also contain other shortcodes, but not another information box. This shortcode does not have any special attributes.

  • Spoilers

    If you want to share information without spoiling the story, or hide an answer to a question while the reader thinks about the solution, the spoiler shortcode may be useful. This is illustrated below.

    How do spoilers work?

    The answer(Click to show)

    Spoilers can contain Markdown and other shortcodes (but not another spoiler).

    The [spoiler] shortcode has two optional attributes:

    • title: default value = 'The answer'; and
    • show: default value = 'Click to show'.

    This:

    [spoiler title="This is the title" show="Click to reveal"]
      Nothing to see here folks!
    [/spoiler]
    

    Will appear as:

    This is the title(Click to reveal)
  • Jump codes

    Jump codes allow you to refer to a specific section of a tutorial, without having to worry about the exact URL. They are discussed in more detail in the 'How to create your first TutnIQ course' tutorial.

    The above link was created by inserting the following shortcode into the text block:

    [jump course='80' section='textblocks']How to create your first TutnIQ course[/jump]
    

    This is less brittle than using the actual url for this particular section, http://www.tutniq.com/s/course/80/3, as it is not affected by sequencing changes.

    Jump codes can be set or edited in the 'Add section header / break' dialog box in the course builder. For new sections / breaks this is accessed via the 'Add content' drop-down box in the course builder. For existing sections, jump codes can be set or modified via the section's edit link in the course builder. The jump code for a particular section (in shortcode and html format) can be retrieved by clicking the 'Get Jump Codes' link for any section in the course builder.

    The jump shortcode has 2 mandatory attributes:

    • course = course id; and
    • section = specified section jump code.
« Previous
[Section: 2 of 4]
ad placeholder

Sharing is caring!

About the author

Course stats

My progress

Find related courses