Advanced: Data Attributes for Widgets

Data Attributes

Data attributes are used on the widget to configure options for the display of classes. Here are the potential data attributes available for use.

AttributeDetails
data-cs-max-classesMax number of classes to be returned. Default is 5.
data-cs-fields

A comma-separated list of fields to be returned.  NOTE: When using multiple values, do not put a space between each value in the comma-separated list.  Spaces between the values will cause the widget to malfunction.

 Possible values:

  • image
  • name (required, default)
  • url (default)
  • start_date
  • start_time
  • price
  • action_button
  • description
data-cs-category-idThe category ID for which you'd like to display classes. (optional)
data-cs-sortHow you would like the results sorted.
Possible values:
  • date (default)
  • price
  • random

 

Styling

The CourseStorm widget can be styled to reflect the look and feel of your site. For more information, see our advanced support article on Styling the Class List Widget.