This is another modified version where links are shown in the left column and tiddler edit-template in the right column (based on the template Alternate editor-Editor).
Then I tried to combine these two here - make the view-template and edit-template of tiddler body to be displayed as needed using a toggle button. I used search-replace operator to do this. But it was not working. Here is the relevant part of the code used. What might be going wrong.
Your replace-template and replace-editor macros don’t currently define actions, just filters, so clicking the button doesn’t actually “do” anything. You’d need to use an action widget - in this case, probably action-setfield.
Also note that your filter isn’t doing what you’d want it to. Here’s what you have:
Square brackets around a title (like [History-Monthly-View-Table]) indicate a literal value, so search-replace is looking for “Alternate viewtemplate” in “History-Monthly-View-Table”—which doesn’t contain that string, of course, so no replacement occurs. To target the text field of the History-Monthly-View-Table tiddler, you’d need {History-Monthly-View-Table}.
However…
Rather than editing your viewtemplate every time you want to switch views, I’d recommend an alternate approach.
Here, we’re using a button to set the text field of a state tiddler, instead of editing one of your core templates.
toggle lets us switch between two (or more) values (though note that you’ll have to click it once to set the initial value.)
We can use filtered transclusion to choose the $transclude template based on the value of the state tiddler. In this case, ~[[Alternate viewtemplate]] is the “fallback” value, which will be used if the state tiddler doesn’t exist.
Using a state tiddler like this means that you won’t “dirty” your wiki every time you switch views, and it should be slightly more efficient than running a search-and-replace.
I knew that there would be a better method than what I was using. I just tried an idea that came to my mind. I think I can learn from this solution and modify some of the other hacks I have done in the past.
Perhaps “combining the view-template and edit-template” which seems to be the solution you were after.
Also this looks similar to your requirements, I have in the past enabled the view toolbar in a similar view so you can edit the tiddler if needed. Here is an earlier post
I had seen Outlier by Mark when I started using TW. I didn’t use it much then. I am away from my desktop at the moment. Looks like I will have to take a look at it once more now that I understand TW things a little more. Thanks for the suggestion @TW_Tones
@TW_Tones I remember something similar to streams created by Mark sometime back. It’s name was similar to Outlier. After trying out the json of the Outlier shared in the Google groups, I have a doubt whether this is the same one or not. Do you have any idea?
I do use section editor in my wikis because it helps to organise tiddler contents (and looks good also) without actually adding any extra contents to the tiddler text field.