Apply style by [data-tiddler-title="<$view field=title/>"] transcluded from a temp tiddler (to make another fullscreen button)

Following @telumire 's idea, I would like to build a Tiddler Fullscreen Button
https://www.telumire.be/TiddlyTweaks/#%24%3A%2FThemeTweaks%2Ftiddler-full-screen%2Fbutton

Unlike his apporach, I would like to write the name to a temporary tiddler (in order not to modify the tiddler itself)

Problem: Transcluding the title this way does not seem to work:

<$tiddler={{$:/temp/fullscreentiddler}}> 
.tc-tiddler-frame[data-tiddler-title="<$view field=title/>"] {
position: fixed;
inset: 0;
z-index: 1000!important;
max-width:unset;
width:unset;
height:unset;
margin:0;
right:<$text text={{{[{$:/state/sidebar}match[yes]then{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}else[0px]]}}}/>;
overflow-y: scroll;
}
[data-tiddler-title="<$view field=title/>"] .tc-fold-banner{
display:none;
}
</$tiddler>

any Ideas? Here’s my test to start with…
fullscreenNOTworking.json (1.1 KB)

<$tiddler={{$:/temp/fullscreentiddler}}>
<$tiddler tiddler={{$:/temp/fullscreentiddler}}>

Thank you @CodaCoder
with your help I can present:
$ _plugins_JJ_tiddler-fullscreen.json (1.9 KB)

which works without modifying the TIddler and making your wiki dirty

1 Like

@JanJo I am liking this button. I need one help with a filter for the viewtemplate cascade. I want the fullscreen tiddlers to use another viewtemplate using the cascade mechanism. What filter should I use to apply that viewtemplate to this fullscreen tiddler.

This sounds smart but I am not firm with the viewtemplate cascade either. So I would be happy to follow your idea - maybe in a new thread…

For the time being, I am using modified telumire’s version by vilc since it uses tag to make the tiddler fullscreen and hence it’s easier for me to create a filter for the viewtemplate cascade

[all[current]tag[Maximized]!field:hide-body[yes]then[$:/arsheth/cardless-ui/viewtemplate-body]]

1 Like

Hi @arunnbabu81, What about:
[all[current]title{$:/temp/fullscreentiddler}!field:hide-body[yes]then[$:/arsheth/cardless-ui/viewtemplate-body]]

I will have to do some more tests. In my short testing, there was some conflict my other viewtemplate cascades…view template was seen used on tiddlers outside of my intended use when I am using the filter which you gave. Will report back after more testing(which may take some more days since I am going for a short trip on the next few days)

The title filter operator is a constructor, not a modifier, which means that it will overwrite any prior steps in the filter rather than comparing them to its parameter. Essentially, [all[current]title{$:/temp/fullscreentiddler}] = [{$:/temp/fullscreentiddler}] - so the view template will show up everywhere whenever “$:/temp/fullscreentiddler” exists and has anything in its text field.

You’ll probably want to use [all[current]field:title{$:/temp/fullscreentiddler}] or [all[current]match{$:/temp/fullscreentiddler}] instead. Both should have essentially the same result - they’ll actually compare the current title to the text content of the $:/temp tiddler.

2 Likes

Hi @arunnbabu81 , if you build something interesting, could you post it?

https://muuri-flex-card-grid-layout.tiddlyhost.com/

@JanJo Finally I was able make the full-screen button and keyboard shortcut work using your code. Demo link is given above. Just click on a tiddler title to make it the active tiddler and press Alt+F to see the full-screen mode with a different template. The images are not rendered here since they are local images.

Edit: Is it possible to make a tiddler in edit state into full-screen mode using your code?

1 Like