In this wiki, I am using the both the default right sidebar and the leftbar by tw_Mat. I want to create a button which can show and hide both the sidebars together.
But only the right sidebar is working with this code.
Also is it possible to do this with a single button instead of the two buttons I am using. Any suggestions?
OK, the attached tiddler will make it so the LeftBar toggle toggles both the LeftBar and the regular sidebar.
If you want to hide the regular sidebar button, you can go to the core tiddler titled $:/core/ui/TopBar/menu and remove the tag $:/tags/TopRightBar from it.
Both tiddlers mentioned can be reset by simply deleting them (this makes the original shadow tiddlers kick in again)
Instead of using the leftbar toggle button, can this functionality be made into a separate viewtoolbar or page control button. This is because sometimes, we may need to open leftbar or right sidebar alone independently. Is that possible ?
You mean to keep the two original buttons and introduce a third button located among either the tiddler tools or the page tools? (…and if it is a page tool, how would it be used when it toggles the very sidebar it is inside?)
Since I use a modified version of right sidebar from JD whitespace theme, a vertical bar of pagecontrol buttons are visible always on the right edge of the screen. So it doesn’t matter whether the right sidebar is visible or not, the page control buttons are always visible.
OK, so delete the previous tiddlers and install the attached one instead.
You can retitle it freely and if you’re not happy with the icons showing you can change them by locating the transclude icons in the code. It is tagged $:/tags/ViewToolbar to make it into a toolbar button. I’m not familiar with the JD whitespace theme so if you’d rather want it as a sidebar button you’ll have to figure it out.