Positioning content elsewhere

Folks, HTML was not my native language as a programmer, and I have being using tiddlywiki so long I am not so sure how to make use of it to do something I think should be simple.

  • Hopefully some of you can help?

I want to have various items in the view template that can be toggled on and off, but I don’t want the toggle to take up space on the tiddler view.

Can I define a div in an 🛈 info tab, and when displaying the view template item, display the toggle (eg checkbox), however position it in the div, in the 🛈 info tab, if it is visible?

  • I would like multiple view template elements to be able to display their toggle in the same div, listed one after the other.

How do we define a position and have content stacked into it?

Thanks in advance if you can help.

This is related to Select and reorder view template items on a per tiddler basis

You should use the TW mechanism. Every tiddler

  • tagged: $:/tags/TiddlerInfo will be shown in the tiddler info-area
  • caption: will define the tab text

done. … Within your custom-info-tiddler, you can do what you want. So it can create list of all possible configurations for you plugins.

You can use my link-to-tabs plugin for easy access while developing.

I am using this all the time thanks @pmario, I cant live without it :nerd_face:

I plan to use $:/tags/TiddlerInfo to host a tab, what I am looking for if possible is a HTML/CSS way to populate this tab so multiple tiddlers tagged $:/tags/ViewTemplate can include it toggle in the info tab.

  • It may seem a little “hair brained” but I think I have good reasons to try and do this.

Have a look, how I did implement my "Click this button … " at: Field Visibility — toggle field visibility in edit mode plugin

I think it’s exactly what you need. No HTML hacks are needed. TW is 100% state-tiddler driven. We can reach every element of the UI manipulating the right tiddlers. … Finding their name is the “hard” work :wink:

https://wikilabs.github.io/editions/field-visibility/#%24%3A%2Fplugins%2Fwikilabs%2Ffield-visibility%2Freadme

Thanks @pmario,

Based on your response and my own I thinking I have found another approach / code pattern to solving this part of the problem;

So I may raise a separate thread in the future in case it interests anyone.

  • I am extending my idea of a display-filter field/mode and adding an override, and using the same field to populate the toggle.

However not withstanding your suggestion as an alternative to;

Positioning content elsewhere (with HTML/CSS)

I feel it is still a question worth answering so will keep the topic open. Perhaps some of our HTML/CSS gurus here can help?

For example in the rating plugin $:/plugins/tobibeer/rate I modified the css, to include the top: 3px;

.tc-rating-template {⇠↩︎
position: absolute;⇠↩︎
right:48px;⇠↩︎
top:5px;↩︎
}↩︎

As a result I save space on the tiddler view / toolbar and it appears above the toolbar buttons;

  • Snag_22cafb
  • It finds it way there not because there is a position in the View or page template but because it is positioned there.
  • Now imagine I wanted to do the same with the Favorites plugin $:/plugins/ajh/favorites, I want the star on the same line, not overlapping and without a new view/page template element.