You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This page is a stub. [Help us expand it!](https://github.com/mstrhakr/plugin-docs/blob/main/CONTRIBUTING.md)
10
+
{: .note }
11
+
> ✅ **Validated against Unraid 7.2.3** - Menu structures and page types verified against live server.
12
12
13
13
## Overview
14
14
@@ -79,18 +79,43 @@ $(function() {
79
79
});
80
80
```
81
81
82
-
## Page Header with Tabs
82
+
## Page Header Attributes
83
+
84
+
Unraid® page files use header attributes to control menu placement, page type, and behavior. Here are the key attributes:
85
+
86
+
| Attribute | Description | Example |
87
+
|-----------|-------------|--------|
88
+
|`Menu`| Parent menu and sort order |`Menu="Docker:2"`|
89
+
|`Title`| Display name in menu/tab |`Title="Compose"`|
90
+
|`Type`| Page type (see below) |`Type="xmenu"`|
91
+
|`Icon`| Menu icon (icon class or path) |`Icon="cubes"`|
92
+
|`Tag`| Font Awesome icon for tabs |`Tag="fa-cubes"`|
93
+
|`Code`| Unicode for custom icon |`Code="f1b3"`|
94
+
|`Cond`| PHP condition for visibility |`Cond="$var['fsState'] == 'Started'"`|
95
+
|`Tabs`| Enable/disable tabs |`Tabs="true"` or `Tabs="false"`|
96
+
|`Lock`| Prevent menu movement |`Lock="true"`|
97
+
98
+
### Page Types
99
+
100
+
| Type | Purpose |
101
+
|------|--------|
102
+
|`xmenu`| Top-level navigation item (appears in header bar) |
103
+
|`menu`| Container page that groups child pages into panels |
104
+
|`php`| Standard PHP page (default if not specified) |
83
105
84
-
Some Unraid page types support a `Tab` header attribute that enables the built-in tabbed interface. This integrates with Unraid's native tab styling rather than requiring custom tab implementation.
106
+
### The Tabs Attribute
107
+
108
+
The `Tabs` attribute controls whether child pages appear as tabs:
85
109
86
110
```
87
-
Menu="Settings"
88
-
Title="My Plugin"
89
-
Icon="cog"
90
-
Tab="true"
111
+
# Enable built-in tab interface
112
+
Menu="Tasks:60"
113
+
Type="xmenu"
114
+
Tabs="true"
115
+
---
91
116
```
92
117
93
-
TODO: Document actual tab header syntax
118
+
When `Tabs="true"`, all pages with `Menu="ParentName:N"` appear as tabs. When `Tabs="false"`, child pages are listed but don't use the tab interface.
94
119
95
120
## Preserving Tab State
96
121
@@ -133,25 +158,44 @@ Each tab can have its own form with independent submission:
133
158
</div>
134
159
```
135
160
136
-
## Multi-Page Tabs
161
+
## Multi-Page Tabs (Menu Numbering System)
137
162
138
-
For very large plugins, use separate `.page` files that appear as tabs:
163
+
Use separate `.page` files with the `Menu` attribute to create multi-tab pages. The format is:
139
164
140
165
```
141
-
# plugins/yourplugin/YourPlugin.page
142
-
Menu="Settings"
143
-
Title="My Plugin"
144
-
Icon="cog"
145
-
---
166
+
Menu="ParentName:SortOrder"
167
+
```
168
+
169
+
-**ParentName** - The name of the parent page (without `.page` extension)
170
+
-**SortOrder** - Numeric value determining tab order (lower numbers appear first)
146
171
147
-
# plugins/yourplugin/YourPluginAdvanced.page
148
-
Menu="Settings:2"
149
-
Title="My Plugin Advanced"
150
-
Icon="cog"
172
+
### Example: Adding a Tab to Docker
173
+
174
+
```
175
+
# compose.manager.page - Adds "Compose" tab to Docker page
176
+
Menu="Docker:2"
177
+
Title="Compose"
178
+
Type="php"
179
+
Cond="$var['fsState'] == 'Started' && exec('/etc/rc.d/rc.docker status | grep -v \"not\"')"
151
180
---
152
181
```
153
182
154
-
TODO: Document the Menu numbering system for related pages
183
+
This creates a second tab on the Docker page (Docker Containers is at position 1).
184
+
185
+
### Sort Order Conventions
186
+
187
+
Lower numbers appear first (leftmost). Common patterns observed in Unraid®:
188
+
189
+
| Range | Usage |
190
+
|-------|-------|
191
+
| 1-10 | Primary/default tabs |
192
+
| 10-50 | Secondary features |
193
+
| 50-100 | Plugin additions |
194
+
| 100+ | Low-priority or conditional items |
195
+
| 999+ | "Other" or catch-all items |
196
+
197
+
{: .tip }
198
+
> Leave gaps between your sort numbers (e.g., use 10, 20, 30 instead of 1, 2, 3) to allow other plugins to insert tabs between yours.
155
199
156
200
## Styling Tabs
157
201
@@ -182,32 +226,162 @@ TODO: Document the Menu numbering system for related pages
182
226
}
183
227
```
184
228
229
+
## Unraid® Menu Structure Reference
230
+
231
+
This reference documents all standard menu locations in Unraid® where plugins can add pages or tabs.
232
+
233
+
### Header Navigation Bar (Tasks)
234
+
235
+
The main navigation bar uses `Menu="Tasks:N"` with these standard positions:
236
+
237
+
| Position | Page | Description |
238
+
|----------|------|-------------|
239
+
|`Tasks:1`| Main, Dashboard | Array status and dashboard (shared position) |
240
+
|`Tasks:2`| Shares, Favorites | User shares and favorites (shared position) |
241
+
|`Tasks:3`| Users | User management (conditionally shown) |
242
+
|`Tasks:4`| Settings | System settings container |
|`Tasks:61`|*Available*| Compose Manager uses this for standalone menu |
246
+
|`Tasks:70`| VMs | Virtual machine management |
247
+
|`Tasks:80`| Apps | Community Applications |
248
+
|`Tasks:90`| Tools | System tools container |
249
+
250
+
{: .tip }
251
+
> Positions 1-4 are reserved for core Unraid® pages. Plugins should use positions 50+ to avoid conflicts.
252
+
253
+
### Settings Submenus
254
+
255
+
The Settings page (`Tasks:4`) contains these category panels:
256
+
257
+
| Menu | Title | Type | Description |
258
+
|------|-------|------|-------------|
259
+
|`Settings:1`| OtherSettings | menu | System Settings panel |
260
+
|`Settings:2`| NetworkServices | menu | Network Services panel |
261
+
|`Settings:3`| UserPreferences | menu | User Preferences panel |
262
+
|`Settings`| Utilities | menu | User Utilities panel (no number = alphabetical) |
263
+
264
+
### System Settings (OtherSettings)
265
+
266
+
Pages in the System Settings panel use `Menu="OtherSettings"`:
267
+
268
+
| Existing Pages | Your Plugin |
269
+
|---------------|-------------|
270
+
| CPU Pinning, Date and Time, Disk Settings, Docker, Global Share Settings, Identification, Management Access, Network Settings, Power Mode, VM Manager | Add with `Menu="OtherSettings"`|
271
+
272
+
### Network Services
273
+
274
+
Pages in the Network Services panel use `Menu="NetworkServices"` or `Menu="NetworkServices:N"`:
275
+
276
+
| Position | Page |
277
+
|----------|------|
278
+
|`NetworkServices:2`| NFS |
279
+
|`NetworkServices:3`| SMB (has sub-tabs) |
280
+
|`NetworkServices:999`| FTP Server |
281
+
|`NetworkServices`| VPN Manager, Outgoing Proxy, Syslog Server (no number = alphabetical) |
282
+
283
+
### User Utilities
284
+
285
+
Plugin settings pages commonly go here using `Menu="Utilities"`:
286
+
287
+
| Existing Pages |
288
+
|---------------|
289
+
| Community Applications, User Scripts, TurboWrite, Backup/Restore Appdata, Fix Common Problems, Stats Settings, System Temp, Custom Tab, rclone, etc. |
290
+
291
+
### User Preferences (UserPreferences)
292
+
293
+
User-specific settings use `Menu="UserPreferences"`:
Cond="$var['fsState'] == 'Started' && exec('/etc/rc.d/rc.docker status | grep -v \"not\"')"
357
+
```
358
+
359
+
### Dynamic Menu Placement
360
+
361
+
Some menus use PHP variables for conditional placement:
362
+
363
+
```
364
+
# Users menu - conditionally shown based on display setting
365
+
Menu="$display['users'] Tasks:3"
366
+
```
367
+
185
368
## Best Practices
186
369
187
370
- Keep related settings together
188
371
- Use clear, descriptive tab names
189
372
- Don't create too many tabs (3-5 is usually ideal)
190
373
- Consider user workflow when ordering tabs
191
374
- Save tab state for better UX
375
+
- Use unique, plugin-prefixed class names to avoid conflicts
376
+
- Scope your jQuery selectors to your container elements
192
377
193
378
## Adding Tabs to Existing Pages
194
379
195
-
Plugins can add new tabs to existing Unraid pages (like the Docker page) using the `Menu` header in `.page` files. This creates a seamless integrated experience but requires careful attention to avoid conflicts.
380
+
Plugins can add new tabs to existing Unraid® pages (like the Docker page) using the `Menu` header in `.page` files. This creates a seamless integrated experience but requires careful attention to avoid conflicts.
196
381
197
382

198
383
*Example: Compose Manager adds a "Compose" tab to the Docker page*
199
384
200
-
### Menu Placement
201
-
202
-
To add a tab to an existing menu, use the menu name with an optional sort order:
0 commit comments