icon Style Options from a File
Created by Orckestra

Default style options

The Orckestra.Web.Html.GetStyleOptionsFromFile function comes with the default style options:

  • None
  • White
  • Light
  • Gray
  • Dark
  • Primary
  • Info
  • Success
  • Warning
  • Danger

The options are defined in:

~/Frontend/Orckestra/Web/Html/GetStyleOptionsFromFile/BackgroundOptions.xml

By default, the Orckestra.Web.Html.GetStyleOptionsFromFile widget function's OptionsXMLFilePath parameter is set to the path above.

The respective style classes are defined in ~/Frontend/Orckestra/Web/Html/GetStyleOptionsFromFile/BackgroundOptions.css or in other stylesheets (normally, Bootstrap-related).

How to present style classes as a list of options on function parameters

Note. For the usage examples, please see the BackgroundStyle parameter of the Orckestra.Web.Html.ImageAndTextTeaser and Orckestra.Web.Html.StatementTeaser functions used on the Venus and Mercury starter sites.

  1. Define your style classes in stylesheets on the website.
    Expand code
  2. Create an XML file and map styles to user-friendly names for them.
    Expand code
    1. CssClassKey: The name of the class defined in a stylesheet.
    2. Label: The user friendly name for the class as a style option on the list.
  3. In the function where you want to use the style option list:
    1. define a parameter of the String type
    2. set its widget property to the Orckestra.Web.Html.GetStyleOptionsFromFile function
    3. set the widget function's OptionsXMLFilePath parameter to the path to your map file (Step 2 above)
      Expand code
  4. Make sure that your function has the stylesheets where the styles are defined (Step 1 above)  linked to from its content part.
    Expand code