I boiled down the xml script to the bare bones. The script below just has the login button and the 2 dynamic getVisible menus. I tested it. It is functional.
Paul, in your example all the ribbon elements are in the xml file and you use the xlam script to control the visible/invisible toggle.
In my example the xml does not contain all the ribbon elements. That means the xlam script does not only control the toggle but also contains the script for the to be toggled ribbon elements.
Can you give me a simple xml/xlam script example with one toggling dynamic menu that reproduces my example?
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="RibbonLoad">
<ribbon>
<tabs>
<tab id="ABCTab" getLabel="RibbonDisplayName" insertAfterMso="TabHome" getVisible="RibbonIsActive">
<group id="ABCServerGroup" label="Server">
<button id="ABCConnect" imageMso="ServerConnection" onAction="ConnectToServer" label="Connect"/>
</group>
<group id="ABCMenus" label="Protocols">
<dynamicMenu id="ABCMenu1" tag="0" getVisible="HaveFolderTag" getLabel="FolderByTag" image="icnFolderLarge" size="large" getContent="MenuContent"/>
<dynamicMenu id="ABCMenu2" tag="1" getVisible="HaveFolderTag" getLabel="FolderByTag" image="icnFolderLarge" size="large" getContent="MenuContent"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>