I threw together a beginning idea for a Tabs Organizer to easily show/hide the Main or More tabs in the Sidebar. Here’s a demo I can’t remember seeing such a thing elsewhere so I made it myself.
- I need a good way to keep non-default tabs from disappearing when completely un-checked. Ideas are welcome.
- I plan on getting draggable lists enabled to re-arrange the position of tabs
- When (if) it feels right, I’ll tag this to show up in the Control Panel
Thoughts, Ideas, etc… are welcome. Beneath the image is the code, just one tiddler is needed for now.
\define checkMain() <$action-listops $field="tags" $subfilter="$:/tags/SideBar"/>
\define uncheckMain() <$action-listops $field="tags" $subfilter="-$:/tags/SideBar"/>
\define checkMore() <$action-listops $field="tags" $subfilter="$:/tags/MoreSideBar"/>
\define uncheckMore() <$action-listops $field="tags" $subfilter="-$:/tags/MoreSideBar"/>
\define defaults()
[[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Explorer]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Plugins]]
[[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Shadows]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [tag[$:/tags/MoreSideBar]] [tag[$:/tags/SideBar]]
\end
<p>Check/Uncheck the boxes for each tab to view in the Main list (horizontal), in the More list (vertical), or not at all.</p>
<table class="no-borders tabsWork">
<tr>
<th>Sidebar Tabs</th>
<th>Main</th>
<th>More</th>
</tr>
<$list filter="[subfilter<defaults>] :sort[get[title]]">
<tr>
<td><$link/></td>
<td><$checkbox filter="[list[!!tags]]" checked="$:/tags/SideBar" unchecked="" default="" checkactions=<<checkMain>> uncheckactions=<<uncheckMain>> ></$checkbox></td>
<td><$checkbox filter="[list[!!tags]]" checked="$:/tags/MoreSideBar" unchecked="" default="" checkactions=<<checkMore>> uncheckactions=<<uncheckMore>> ></$checkbox></td>
</tr>
</$list>
</table>
<style>
table.no-borders,
table.no-borders tr,
table.no-borders tr th,
table.no-borders tr td { border:0 ; }
table.tabsWork tr :nth-child(1) { text-align: left; }
table.tabsWork tr :nth-child(2),
table.tabsWork tr :nth-child(3) { text-align: center; }
</style>