Forums › Forums › General Questions › Disabling individual content toggle panels from toggling
Tagged: content-toggle
-
Disabling individual content toggle panels from toggling
-
Hi
I know this might be going against the way the plugin’s designed, but I’d like to disable a couple of the panels in a content toggle from actually toggling! The reason being I’m using it as a menu and two of the items don’t actually have any sub-pages so ideally no icon (sure I can hide that with css) and no toggle function, just linked text.
The menu in question is on the left on this page: https://www.stratatec.co.uk/new/sectors/ and it’s the top and bottom toggles which don’t have any content.
I saw your latest update 2.4.9 said “Content Toggle – Allow setting toggle status for each panel separately.” but not sure this is what I am trying to achieve?
I did try adding standard text links above the content toggle instead but this seemed to break the styling of it? Perhaps because I am using it in a re-usable block?
Thanks
David
-
HI @dub ! The newly-added feature for content toggle is for allowing to set the individual toggle status of each panel when the page first loads. The setting that prevents panels within a content toggle instance from being toggled at all ensures that all panels within it will be open.
Perhaps you could use multiple content toggle blocks for this scenario. You can set the first and the last content toggle block to be collapsed when the page loads, and add custom CSS to ensure that nothing changes appearance-wise whenever they’re clicked. Then, you can leave all the other content toggle blocks that appear between the first and the last blocks in your layout to whatever their settings currently are.
Please let us know how it goes.