-
☆ A M B ☆
- 24,524 Posts
Can’t the TV output widget use a comma for the delimiter?
I’ve done a test and it seems that I need to specify the startDoc parameter to specify the root folder. Use the following to set it to the current page:
&startDoc=`[*id*]`
I’m not sure why this is necessary - DropMenu should default to a value of 0, which presumably is the site root (though I’m not sure about this). I’ll look into the code later on today.
Also, make sure you set the showAllInMenu parameter to true if you want to display pages that do not normally show in the menu.
Ah yes, I see now... It only loops through a container’s children if the container matches. So one way around the problem is to give the parent containers some keyword or TV that will be matched as well as the children pages you want to list.
Alternatively, the code could be modified so that all children are checked regardless of match, but then there is the question of how to show the results if a child matches but a parent doesn’t - do you a) output parents if a child matches, regardless of whether the parents match or not, b) don’t output parents that don’t match, in which case the resulting hierarchy could be misleading, c) output unmatched parents as text instead of links, d) output unmatched parents as links. I favour choice c, though I’m sure there are others and I’ve not given it too much thought.
Either way, it’s probably best that a variable be added that allows the user to have a choice. With that and the facts that the DropMenu code is looking really bloated (I’m sure there are legacy variables still used that aren’t actually set anywhere) and as far as I know it’s been replaced with Wayfinder (which I’ve not personally used), I’m reluctant to add anything more too it.
Does anyone know the extent to which Wayfinder supports regular expressions?