Example Empty Story message Tip

192 views
Skip to first unread message

TonyM

unread,
Jan 18, 2020, 8:42:47 PM1/18/20
to TiddlyWiki
Folks,

When you close all tiddlers you get a empty Story, try this tip
  • Create a tiddler $:/config/EmptyStoryMessage and place the following in it.
  • Now close all you tiddlers

<h2>All tiddlers have being closed</h2>
<h3>Go home {{$:/core/ui/Buttons/home}} or open this view in a new window {{$:/config/EmptyStoryMessage||$:/core/ui/Buttons/open-window}}, tiddlers opened will open here</h3>
<h3>or Search </h3>{{$:/core/ui/SideBarSegments/search}}
<h4>[[Edit this view|$:/config/EmptyStoryMessage]]</h4>
<h2>Advanced Search</h2>
{{$:/AdvancedSearch}}
<hr>
{{TableOfContents}}

Try the Open in new window button I have provided, it works like a remote control.

One Bug!

The buttons do not render their icons in the new window 

Anyone know a fix?
This assumes you have a table of contents setup but works regardless.

Regards
Tony

Mat

unread,
Jan 18, 2020, 9:05:50 PM1/18/20
to TiddlyWiki
Cool! I was not aware of $:/config/EmptyStoryMessage (btw, "these things" - whatever that means - are usually done via special system tags but not this one. I wonder why.)


One Bug!

The buttons do not render their icons in the new window 

Seems to work for me: Win/Chrome. Maybe it's a browser issue. I have a vague memory of it being brought up previously. Maybe there's an issue report?

<:-)

Mohammad

unread,
Jan 18, 2020, 10:08:11 PM1/18/20
to TiddlyWiki
On FF 77. I confirm the issue reported by Tony! Not working either by me.

<:-)

TonyM

unread,
Jan 18, 2020, 10:48:55 PM1/18/20
to TiddlyWiki
I have a memory of this having a work around, but needing a fix.

<style>
{{$:/themes/tiddlywiki/vanilla/base}}
</style>


I tried import the page variables and transclude the theme styles;
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]



All that is missing is the images for the button which are typically transcluded in a button using
class=<<tv-config-toolbar-class>>




But no solution YET

Regards
Tony

Mohammad

unread,
Jan 18, 2020, 10:59:21 PM1/18/20
to TiddlyWiki
Tony!
 Why not they work in NEW WINDOWS?

I would like to know Jeremy opinion?

I have encountered the same problem. Example

Goto


and open it in a new window! No formatting will be seen!
Seems all formatting and customization applied using $:/tags/ViewTemplate, and user class field are ignored.

--Mohammad

TonyM

unread,
Jan 19, 2020, 12:54:37 AM1/19/20
to TiddlyWiki
Folks,

It was fixed in this https://github.com/Jermolene/TiddlyWiki5/issues/4372 issue and is now fixed in the pre-release.

I am now exploring making a couple of smart tests given;

1. When all tiddlers closed
currentTiddler="" storyTiddler=""

2. When editing 
<<currentTiddler>>=<<storyTiddler>>

3. When in own window
currentTiddler=Tiddler in window storyTiddler=""

So I can hide the message

All tiddlers have being closed

Except in case 1 above.

Regards
Tony

A Gloom

unread,
Jan 19, 2020, 6:55:35 AM1/19/20
to TiddlyWiki
Good thing it was fixed, this is far as I got with it in the past-- got icons to display but it involved hacking out button code (applied to Tony's code)

buttons.jpg

<h2>All tiddlers have being closed</h2>
<h3>Go home <$transclude tiddler="$:/core/ui/Buttons/home" mode="inline"/> xx{{$:/core/images/home-button}}xx <br/>
xx1<$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/home-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Home/Caption}}/></span>
</$list>
</$button>xx1 &nbsp;
xx2<$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>
{{$:/core/images/home-button}}
</$button>xx2 &nbsp;
xx3<$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class="tc-btn-rounded">
{{$:/core/images/home-button}}
</$button>xx3<br/>

or open this view in a new window {{$:/config/EmptyStoryMessage||$:/core/ui/Buttons/open-window}}, tiddlers opened will open here</h3>
<h3>{{$:/core/ui/Buttons/new-tiddler}}</h3>

Mohammad

unread,
Jan 19, 2020, 7:26:30 AM1/19/20
to TiddlyWiki
For me it does not work!

A Gloom

unread,
Jan 19, 2020, 9:29:25 AM1/19/20
to TiddlyWiki
Mohammad

For me it does not work!

Are you referring to the transclusion problem Tony mentioned or the one you're having with https://kookma.github.io/Tiddlyshow/#Tutorial%20Title%20Page?

I haven't had the chance to look at it but could once I get back up-- looking at problems like these I do cause it helps me learn TW's inner workings.

Mohammad

unread,
Jan 19, 2020, 2:40:38 PM1/19/20
to TiddlyWiki


On Sunday, January 19, 2020 at 5:59:25 PM UTC+3:30, A Gloom wrote:
Mohammad

For me it does not work!

Are you referring to the transclusion problem Tony mentioned or the one you're having with https://kookma.github.io/Tiddlyshow/#Tutorial%20Title%20Page?

I mean this! When you open a slide in a new window no formatting works. User class, formatting through conditional viewtemplate,...

TonyM

unread,
Jan 19, 2020, 4:11:35 PM1/19/20
to TiddlyWiki
Mohammad

The open in new window fix is only in prerelease. If you are still getting something can you What a minimal example we can try on prerelease.

Regards
Tony

HC Haase

unread,
Jan 20, 2020, 2:52:07 AM1/20/20
to TiddlyWiki
This is neat... i think, I am not sure if I will use it or not.

I find the wording a bit confusing, so here is an alternative version. I have also added a new tiddler button.


<h2>All tiddlers have been closed</h2>
<h3>Go home {{$:/core/ui/Buttons/home}} or open this view in a new window {{$:/config/EmptyStoryMessage||$:/core/ui/Buttons/open-window}}, tiddlers will open here.</h3>
<h3>Create a new tiddler {{$:/core/ui/Buttons/new-tiddler}} or Search </h3>{{$:/core/ui/SideBarSegments/search}}
<h4>[[Edit this view|$:/config/EmptyStoryMessage]]</h4>
<h2>Advanced Search</h2>
{{$:/AdvancedSearch}}
<hr>
{{TableOfContents}}

I also find two searchbars a bit redundant so here is a verison with only one


<h2>All tiddlers have been closed</h2>
<h3>Go home {{$:/core/ui/Buttons/home}} or open this view in a new window {{$:/config/EmptyStoryMessage||$:/core/ui/Buttons/open-window}}, tiddlers will open here.</h3>
<h3>Create a new tiddler {{$:/core/ui/Buttons/new-tiddler}} or Search </h3>{{$:/AdvancedSearch}}
([[Edit this view|$:/config/EmptyStoryMessage]])

<h3>Table of Contents</h3>
{{TableOfContents}}


HC Haase

unread,
Jan 20, 2020, 2:54:48 AM1/20/20
to TiddlyWiki
Perhaps it would be an idea to put this config in the control panel, like the Text for new journal tiddlers??

Mohammad

unread,
Jan 20, 2020, 5:02:01 AM1/20/20
to TiddlyWiki
Hi Tony!

I have attached a working example to show the issue!
drag and drip the attached json
Look at the Test-New-Win, it has a red border
Now open it in the new window, you wont see that borders!

I see all formatting and customization through user class and ViewTemplate are ignored!

--Mohammad
tiddlers.json

TonyM

unread,
Jan 20, 2020, 3:02:14 PM1/20/20
to TiddlyWiki
Mohammad

Perhaps we could start a new thread on open in new window.

One thing to keep in mind is open in new window is only rendering the text field of the tiddler. I depend on this to print specific tiddler content to pdf as an example. We do not see the view template buttons etc. Perhaps it is this which is giving apparently inconsistent results?

I need to give this a little more thought.

Tony

TonyM

unread,
Jan 20, 2020, 3:38:54 PM1/20/20
to TiddlyWiki
Mohammad,

Yes, I looked at your example and the elements present on a tiddler through the story or view template are not included in the new window, just the text field. 

This is a desirable behaviour but we could easily have alternate open in new window buttons that include extended elements.

Try this, open 

$:/core/ui/PageTemplate/story and open it in new window.

 

I created a Move to new window button, works the same as open in new window, but closes the tiddler in the story automaticaly.

Regards
Tony

TonyM

unread,
Jan 20, 2020, 3:39:38 PM1/20/20
to TiddlyWiki
Thanks for Sharing HC

Re "config in the control panel"

Yes, perhaps with a simple default message and the home button?

Regards
Tony

Mohammad

unread,
Jan 20, 2020, 11:09:25 PM1/20/20
to TiddlyWiki
Good idea Tony!
I follow up the new thread!

--Mohammad

Mohammad

unread,
Jan 20, 2020, 11:10:50 PM1/20/20
to TiddlyWiki
Tony!


On Tuesday, January 21, 2020 at 12:08:54 AM UTC+3:30, TonyM wrote:
Mohammad,

Yes, I looked at your example and the elements present on a tiddler through the story or view template are not included in the new window, just the text field. 

This is a desirable behaviour but we could easily have alternate open in new window buttons that include extended elements.

Try this, open 

$:/core/ui/PageTemplate/story and open it in new window.

 

So, I need to have a custom button in tiddler view toolbar! 
Reply all
Reply to author
Forward
0 new messages