Is it possible to programmaticallly alter the sidebar, in particular the sidebar segments?
What I would like to do is programmatically either add a newly created widget in a certain position, or if it is already present in the sidebar move it to a different place. This is to avoid the user having to do that during installation of my highlight plugin (Simple HighlightWidget (again), the input field with the buttons below the search input field), which is nearing completion. The list field of the $:/tags/SideBarSegments tiddler seems to be a readonly property. I get errors when I try to add the title of the new widget or, if the widget is already in the sidebar, move the title to a different position, or when I try to replace the array with a newly created one.
Are you doing that in javascript?
In your plugin, include a tiddler (e.g., “Simple Highlight SideBar”)
- The content of this tiddler should invoke your new widget.
- Tag it with
$:/tags/SideBarSegment
- Add a
list-after
field containing$:/core/ui/SideBarSegments/search
enjoy,
-e
1 Like
list-after
makes it work (I should have known).
Thanks!