[issue]: "parent" menu class plugin entry doesn't apply to sub-directories or files in those sub-directories
Official FAQ
- [X] I have checked the official FAQ.
Ventoy Version
1.0.86
What about latest release
Yes. I have tried the latest release, but the bug still exist.
Try alternative boot mode
Yes. I have tried them, but the bug still exist.
BIOS Mode
Both
Partition Style
MBR
Disk Capacity
32GB
Disk Manufacturer
SanDisk
Image file checksum (if applicable)
Yes.
Image file download link (if applicable)
No response
What happened?
When applying class entries to my drive structure via the menu-class plugin the images aren't being applied as I would expect...
Below is a sample of my menu class key from ventoy.json;
"menu_class": [
{
"dir": "/iso/windows",
"class": "windows"
},
{
"parent": "/iso/windows",
"class": "windows"
},
{
"dir": "/iso/linux",
"class": "linux"
},
{
"parent": "/iso/linux",
"class": "linux"
},
{
"dir": "/iso/linux/arch",
"class": "arch"
},
{
"parent": "/iso/linux/arch",
"class": "arch"
},
{
"dir": "/iso/linux/arch/steamos",
"class": "steamos"
},
{
"parent": "/iso/linux/arch/steamos",
"class": "steamos"
},
{
"dir": "/ios/tools",
"class": "driver"
},
{
"parent": "/iso/tools",
"class": "driver"
}
]
Below is a sample of my file structure, with what I would expect the result to be based on settings above and what Ventoy is actually doing...
FILE STRUCTURE EXPECTED ACTUAL
iso none none
├── linux linux linux
│ ├── arch arch arch
│ │ ├── steamos steamos steamos
│ │ │ ├── holoiso steamos none
│ │ │ │ └── holoiso.iso steamos none
│ │ │ └── winesapos steamos none
│ │ │ └── winesapos.iso steamos none
│ │ └── endeavoros arch none
│ │ └── endeavoros.iso arch none
│ └── ubuntu linux none
│ └── ubuntu.iso linux none
├── tools driver driver
│ ├── memtest86.iso driver driver
│ ├── gparted.iso driver driver
│ └── somethingelse.iso driver driver
└── windows windows windows
├── win7 windows none
│ └── win7.iso windows none
├── win10 windows none
│ └── win10.iso windows none
└── win11 windows none
└── win11.iso windows none
I really don't want to have to go through and assign a menu class plugin entry of "dir" and "parent" for every directory in my structure...
Yes.
For menu class plugin, parent is used only for files that are in the directory. Not including files in its sub-directories and also not include any directory.
The description in the document page was inaccurate, I have fixed it.
That's for simple code implement. With VentoyPlugson, you just need to click the mouse a few more times, not so inconvenient.
It's very inconvenient when I have over 50 directories in my overall structure which I could apply relevant icons to in as few as 10 entries in the JSON file if the PARENT key worked as expected. I'm going to need at least 100 entries to achieve the same result the way it currently works,
Not to mention the faff I'd have to go through if I wanted to change my folder structure at any point.