Move MainMenu of SideBar

196 views
Skip to first unread message

Mihec

unread,
Jan 24, 2008, 7:56:28 AM1/24/08
to TiddlyWiki
Hi

I am using the KubrickTheme (http://tiddlythemes.com/#Kubrick). Is it
possible (and how to do it?) to move the MainMenu of of the SideBar? I
am using the ToggleRightSideBar macro to hide the sidebar and the
controls within it, however, I would like for the mainmenu to stay
even if the sidebar controls are hidden.

Thanks,
Mike

FND

unread,
Jan 24, 2008, 8:13:35 AM1/24/08
to Tiddl...@googlegroups.com
> controls within it, however, I would like for the mainmenu to stay
> even if the sidebar controls are hidden

So that means you don't want the content area to enlarge then?
That makes things a little easier, as we can use the ToggleElementMacro*.

In your PageTemplate, find the following lines:
---------------
<div id='sidebarSearch' macro='search'></div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
---------------
Swap those (i.e. "mainMenu" above "sidebarSearch").

Then, between "mainMenu" and "sidebarSearch", add the following line:
---------------
<div id='sidebarControls'></div>
---------------

Next, find this line:
---------------
<div id='sidebarTabs' refresh='content' force='true'
tiddler='SideBarTabs'></div>
---------------
Below that, insert this line:
---------------
</div>
---------------

Then you can use the ToggleElementMacro (e.g. in your MainMenu) like so:
<<toggleElement "sidebarControls">>

HTH.


-- F.


http://devpad.tiddlyspot.com/#ToggleElementMacro

Mihec

unread,
Jan 25, 2008, 8:39:58 AM1/25/08
to TiddlyWiki
Hi, thanks for the answer. However, if I understand correctly, the
sidebar (including the "new tiddler" etc. links + the tabs) gets
hidden only after clicking the toggle command. I intend to use the
tiddlywiki for webpage and it is desirable that all the controls
(except the MainMenu) remain hidden so that the visitors could not get
(accidentaly) distracted or confused.

Mike

FND

unread,
Jan 25, 2008, 2:05:22 PM1/25/08
to Tiddl...@googlegroups.com
> if I understand correctly, the
> sidebar (including the "new tiddler" etc. links + the tabs) gets
> hidden only after clicking the toggle command.

There is a macro parameter for the startup mode:
<<toggleElement "sidebarControls" "" "" "" "" "hide">>
In order for this to take effect, it needs to be rendered. To make it
render on startup, you could add the macro call to the MainMenu. If you
like, you can hide the resulting button:
---------------
@@visibility:hidden;<<toggleElement "sidebarControls" "" "" "" "" "hide">>@@
---------------

On a general note, using TiddlyWiki as a website is a bit of a
contentious issue:
http://www.tiddlywiki.org/wiki/TiddlyWiki_As_a_Website
(This page on the community wiki is still incomplete - feel free to
contribute any wisdom you might have to add.)

You might also want to look into using PublisherPlugin to have different
modes for authors and visitors.

HTH.


-- F.

Reply all
Reply to author
Forward
0 new messages