For me, I just create an attribute that is related to the option set itself and label it as ‘parent option’.
So for example, I have Main, Sub, Child as display values. On Main ‘parent option’ attribute, it is empty, then on Sub the ‘parent option’ attribute is Main (not text but the actual option) and then on Child the ‘parent option’ attribute is Sub (again not text but the actual option).
I can then do things like Get all Options Filtered ‘this options parent is empty’ to get all of my Main options, then when an option is selected I can do Get all Options Filtered ‘this options parent is selected option’ to show all the sub options or child options.
This is something that will be unnecessary as the use of /
is not something typically used in a URL parameter to separate a list of items in the parameter. You can check out my posts on how to use lists in URL parameters. The normal use case of such is for storing a list of values inside one URL parameter, and this use case of yours would not in my opinion fall into the category of when to use a list for URL parameters.
It seems like from your desired URL structure pagename?v=settings/my-profile
you are conflating the idea of a URL parameter and the URL path list.
URL path list is different from URL parameter. The path list would follow the page name, for example .com/stores/massachusetts/boston
is a proper path list and in that I can have .com/stores/massachusetts/boston?view=menu
where I am properly using a path list for the location details to get the SEO benefits of that structure while my URL parameter is properly used to change the view of the page to showcase the menu of the store, which URL parameters would have nothing to do with SEO, and in some cases take away from it.
To be honest in my app I would have a structure of .com/stores/en/massachusetts/boston/luckysbar/menu
as I’d be looking to get each of those pages indexed by Google, and do not want any URL parameters in the URL for SEO purposes. I have to track each item in the path list, where I would know that item#5 is store name, #6 is ‘view’ while #2 is language preference etc. I do this so that I can have an indexable page for .com/stores/en/massachusetts
and .com/stores/sp/massachusetts
that would show all stores in massachusetts in English and the other in Spanish. But, URL path lists can be a bit of a challenge, and can not really be used if the page has content type set.
If you want to use URL parameters for your breadcrumb setup, not advisable but can be done, then use a separate URL parameter for the main option, the sub option and the child option so it would look like pagename?v=settings&s=my-profile&c=images
This will make it much easier to work with than trying to URL parameter as a list, and might be a bit easier to display the breadcrumb properly to the user as URL path list is sometimes difficult to track the different path list items and the order for which they would appear. And would be a better approach if the page for which the breadcrumb is to be has a content type set on the page, as we can not use the send data with text if the page has content type set.