Bright Shortcode Reference

New in Bright plugin version 6.8.2+

[bright type="courselist" api_template="public"/]

By default, the Bright API will return the ‘public_minimum’ data format to the web browser for a courselist. Setting this attribute allows for a different data format to be selected. ‘public’ enables all available fields to be returned to the browser. Note this increases the document size and will incur a performance penalty.

Special Note when using multiple courselisters on a page

Courselist results are cached per request. So the api_template you use on your first courselister will be in effect for every courselist on the page…..

To further alter the courselister data, you can use a wordpress hook called bright_extend_on_courselist. See the Bright Hooks Reference for more information.

[bright class="my-div-class"/]

The generated template container div will have the specified class added:

<div class="my-div-class ...">...</div>

If not set, a ‘course’ template will have a class of ‘bright-launchbox’ added, while courselist will have a class added of ‘bright-courslist’., and a generic template will have a class added of ‘bright-embedder.

[bright course=”A Course Guid”/]

For a bright embed of type course, this specifies the course_guid. Note, it is possible via various other mechanism to specify a course guid. Specifically:

  • via the URL, where the query parameter is ?bright_course_id=A Course Guid
  • via the bright_course_id [Filter]. See the bright template filter reference on this site for more information.

The order of assignment precedence is

  1. then via Bright URL parameter. Specifically, if set, it can be overridden via #2 below.
  2. via course= embedder attribute
  3. the GUID assigned via method or 1 or 2 above is passed to the bright_course_id filter.
[bright id='my-div-id']

Instead of an autogenerated div id for your bright template container [something that looks like “c598abf5f2acc7dfb23b40b1d1862a09”, for example], you can specify a string to be the div id.

Note, no error checking is performed. If you use duplicate ids on the same page, it is likely one or more of these templates will not render correctly.

[bright ignore="true" .../]

This will supress the expansion of this shortcode. We will in fact, try and reassemble it as text and render it. This is useful when building user help pages and tutorials with bright shortcodes in them.

For templates of type course, the {{{launchbutton}}} directive creates a button to launch the course, with text ‘Launch Courses’. Use

[bright launch_button_text="Different Text"]

to change the text of the launch button.

Note – Launch button text can also be changed by setting locale=”[a bright locale]”, when another language pack is available. Contact Bright Support to find out what language packs are available.

[bright locale='fr']

Documentation for the use of this feature is forthcoming. Thank you for your patience. If you’d like to be notified when the documentation will be available, please contact us at Aura Support

For templates of type course, the {{{reviewbutton}}} directive creates a button to launch the course in Review Mode, with text ‘Review Course’. Use

[bright review_button_text="Different Text"]

to change the text of the launch button.

Note – Review button text can also be changed by setting locale=”[a bright locale]”, when another language pack is available. Contact Bright Support to find out what language packs are available.

[bright template="my-template"/]
[bright type="(|course|courselister|generic)"]

Course is the default and it is not necessary to define this. When specifying a course lister, the bright template [either inline or specified via template= attribute] has the site course list made available as its context document.

A generic template will not have any learning data exported to it, but can still use the bright.js framework to render. Also API bright extension hooks will still be run.