Can contents displayed via viewtemplates in a tiddler be shown in modal view of that tiddler

I use an alternate viewbox to view tiddlers based on one of Charlie Veniot’s modal based solutions - example 1. Click on the viewtoolbar button shown in the image below to see this tiddler in a modal.

image

Is it possble to include contents which are displayed via viewtemplates in modal view of that tiddler.

The answer is yes, you just need to code it that way.

  • You can build your own equivalent to a view template
  • Or you can kidnap existing tiddlywiki methods

For example I have an open in new window button that opens the selected tiddler in a new window but using the template that $:/core/ui/PageTemplate/story uses to display tiddlers, first it discovers the template config in $:/config/ui/ViewTemplate which is by default
$:/core/ui/ViewTemplate

  • For example put this in a tiddler on tiddlywiki.com {{Features||$:/core/ui/ViewTemplate}}
  • You would put something like this in your Modal tiddler
  • Do not put this in the same tiddler you are trying to display as you get a eternal loop

The long form of {{Features||$:/core/ui/ViewTemplate}} is

<$tiddler tiddler="Features">
   <$transclude tiddler="$:/core/ui/ViewTemplate"/>
</$tiddler>

ALthough I expect you may need an edited alternative to $:/core/ui/ViewTemplate

2 Likes

I think I understood what you were trying to explain. I did a small trial and it worked. Now I have to do some tweaking to make it beautiful and easily useable.

1 Like

It was hard to explain without going into the details which could get too complex.

So I am glad this has helped.