|
9 | 9 | - Changing the text of the buttons
|
10 | 10 | - Redirecting the button to a specific location (e.g. an introductory page)
|
11 | 11 |
|
12 |
| -## Attributes |
| 12 | +### Attributes |
13 | 13 |
|
14 | 14 | All configuration options must be added and amended, where appropriate, for all JSON files.
|
15 | 15 |
|
16 |
| -### *config.json* |
| 16 | +*config.json* |
| 17 | + |
17 | 18 | The following attributes are set within *config.json*.
|
18 | 19 |
|
19 |
| -### **\_homeButton** (object): |
20 |
| -The Home Button object contains the following settings: |
| 20 | +**\_homeButton** (object): The Home Button object contains the following settings: |
| 21 | + |
| 22 | +>**\_isEnabled** (boolean): Controls whether the Home Button extension is enabled. |
21 | 23 |
|
22 |
| -#### **\_isEnabled** (boolean): |
23 |
| -Controls whether the Home Button extension is enabled |
| 24 | +*course.json* |
24 | 25 |
|
25 |
| -### *course.json* |
26 | 26 | The following attributes are set within *course.json*. These are used to set some default settings and the navigation order:
|
27 | 27 |
|
28 |
| -### **\_homeButton** (object): |
29 |
| -The Home Button object contains the following settings: |
| 28 | +**\_homeButton** (object): The Home Button object contains the following settings: |
| 29 | + |
| 30 | +>**\_navOrder** (number): The order that the button appears in the navigation. |
| 31 | +
|
| 32 | +>**\_showLabel** (boolean): Controls whether the button should use a navigation label or just an icon. |
30 | 33 |
|
31 |
| -#### **_navOrder** (number): |
32 |
| -The order that the button appears in the navigation |
| 34 | +>**alt** (string): The button's `aria-label` text. Used to override global setting. |
33 | 35 |
|
34 |
| -#### **_showLabel** (boolean): |
35 |
| -Controls whether the button should use a navigation label or just an icon |
| 36 | +>**navLabel** (string): The button label text as it appears in the navigation. |
36 | 37 |
|
37 |
| -#### **alt** (string): |
38 |
| -The button's `aria-label` text. Used to override global setting |
| 38 | +>**\_navTooltip** (object): The Navigation Tooltip object contains the following settings: |
39 | 39 |
|
40 |
| -#### **navLabel** (string): |
41 |
| -The button label text as it appears in the navigation |
| 40 | +>>**\_isEnabled** (boolean): Controls whether the navigation tooltip is enabled. |
42 | 41 |
|
43 |
| -#### **_navTooltip** (object): |
44 |
| -The Navigation Tooltip object contains the following settings: |
| 42 | +>>**text** (string): The text of the tooltip. Used to override global setting. |
45 | 43 |
|
46 |
| -##### **\_isEnabled** (boolean): |
47 |
| -Controls whether the navigation tooltip is enabled |
| 44 | +*course.json* and *contentObjects.json* |
48 | 45 |
|
49 |
| -##### **text** (string): |
50 |
| -The text of the tooltip. Used to override global setting |
| 46 | +The following attributes are set within *course.json* and / or *contentObjects.json*. These are used to *override* global settings and customize the button for a specific page or menu. |
51 | 47 |
|
52 |
| -### *course.json / contentObjects.json* |
53 |
| -The following attributes are set within *course.json* and/or *contentObjects.json*. These are used to *override* global settings and customize the button for a specific page or menu. |
| 48 | +**\_homeButton** (object): The Home Button object contains the following settings: |
54 | 49 |
|
55 |
| -### **\_homeButton** (object): |
56 |
| -The Home Button object contains the following settings: |
| 50 | +>**\_isEnabled** (boolean): Controls whether the Home Button extension is enabled. |
57 | 51 |
|
58 |
| -#### **\_isEnabled** (boolean): |
59 |
| -Controls whether the Home Button extension is enabled |
| 52 | +>**\_hideHomeButton** (boolean): Controls whether the home button is hidden or not. |
60 | 53 |
|
61 |
| -#### **\_hideHomeButton** (boolean): |
62 |
| -Controls whether the home button is hidden or not |
| 54 | +>**\_hideBackButton** (boolean): Controls whether the back button is hidden or not. Applies to *contentObjects.json* only. |
63 | 55 |
|
64 |
| -#### **\_hideBackButton** (boolean): |
65 |
| -Controls whether the back button is hidden or not. Applies to *contentObjects.json* only. |
| 56 | +>**\_redirectToId** (string): The page ID that the home button should redirect the user to. Use when overriding standard behaviour such as redirecting to an introductory page from the menu. |
66 | 57 |
|
67 |
| -#### **\_redirectToId** (string): |
68 |
| -The page ID that the home button should redirect the user to. Use when overriding standard behaviour such as redirecting to an introductory page from the menu. |
| 58 | +>**\_iconClasses** (string): CSS class name to override the default home button icon application. Default application for the home button is `icon-home` on all pages with `icon-controls-left` on the menu. If an override is applied to *course.json* the override will apply to the menu and all pages. If an override is applied to *contentObjects.json* the override will only apply specifically to that page. |
69 | 59 |
|
70 |
| -#### **alt** (string): |
71 |
| -The button's `aria-label` text. Used to override global setting |
| 60 | +>**alt** (string): The button's `aria-label` text. Used to override global setting. |
72 | 61 |
|
73 |
| -#### **navLabel** (string): |
74 |
| -The button label text as it appears in the navigation. Used to override global setting |
| 62 | +>**navLabel** (string): The button label text as it appears in the navigation. Used to override global setting. |
75 | 63 |
|
76 |
| -#### **_navTooltip** (object): |
77 |
| -The Navigation Tooltip object contains the following settings: |
| 64 | +>**_navTooltip** (object): The Navigation Tooltip object contains the following settings: |
78 | 65 |
|
79 |
| -##### **\_isEnabled** (boolean): |
80 |
| -Controls whether the navigation tooltip is enabled. Used to override global setting |
| 66 | +>>**\_isEnabled** (boolean): Controls whether the navigation tooltip is enabled. Used to override global setting. |
81 | 67 |
|
82 |
| -##### **text** (string): |
83 |
| -The text of the tooltip. Used to override global setting |
| 68 | +>>**text** (string): The text of the tooltip. Used to override global setting. |
84 | 69 |
|
85 | 70 | ## Limitations
|
86 | 71 |
|
87 | 72 | No known limitations.
|
88 | 73 |
|
89 | 74 | ----------------------------
|
90 | 75 |
|
91 |
| -**Framework versions:** 5.30.3+<br> |
92 |
| -**Author / maintainer:** CGKineo<br> |
| 76 | +**Framework versions:** 5.30.3+<br> |
| 77 | +**Author / maintainer:** CGKineo<br> |
93 | 78 | **Accessibility support:** WAI AA<br>
|
94 | 79 | **RTL support:** Yes<br>
|
95 | 80 | **Cross-platform coverage:** Chrome, Chrome for Android, Firefox (ESR + latest version), Edge, IE11, Safari 12+13 for macOS/iOS/iPadOS, Opera<br>
|
0 commit comments