2016-07-26, 22:44
This is completely untested and being typed off the top of my head (which is to say, don't expect it to work as-is but it will hopefully give you the idea of what I mean). In the button which sets the widget, something like:-
... (setting to the home window in this case, but should be able to be done directly to the current window); and then in the overrides ...
... and you now have different nodes that will appear depending on whether the widgetPath property is set on the current menu item.
Code:
<onclick condition="IsEmpty(Container(211).ListItem.Property(widgetPath))">ClearProperty(CustomPropertyForVisibility,10000)</onclick>
<onclick condition="!IsEmpty(Container(211).ListItem.Property(widgetPath))">SetProperty(CustomPropertyForVisibility,True,10000)</onclick>
<onclick>SendClick(312)</onclick>
... (setting to the home window in this case, but should be able to be done directly to the current window); and then in the overrides ...
Code:
<widget-groupings>
<!-- Nodes that are visibile when there is no widget set -->
<node label="..." condition="IsEmpty(Window(10000).Property(CustomPropertyForVisibility))">
...
</node>
...
<!-- Nodes that are visible when there is a widget set -->
<node label="..." condition="!IsEmpty(Window(10000).Property(CustomPropertyForVisibility))">
...
</node>
...
</widget-groupings>
... and you now have different nodes that will appear depending on whether the widgetPath property is set on the current menu item.