Eric you never cease to amaze me. Thank you for that. I like the button
options in this approach. Question: since the whole point in my case is to
transclude existing tiddlers in modals, I would need to replace all
existing instances of $:/temp/modal in this snippet with the title of my
tiddler? And maybe delete the text="" part?

On a related note, below is a simple version I did with the appear plugin.
Works nice. I will just need to adjust the CSS so it appears more like a
modal does, centered and a certain % of the width, and maybe add scrolling.
I think I can figure that out.

`<$appear type="popup"><$list filter="[[Tiddler title]]"><$link><h1><$view
field="title"/></h1></$link><$transclude field="text"
mode="block"/></$list></$appear>`




On Thu, Nov 5, 2020 at 12:37 PM Eric Shulman <[email protected]> wrote:

> On Thursday, November 5, 2020 at 7:23:45 AM UTC-8, David Gifford wrote:
>>
>> I just want to make it easier to open modals as tiddlers, for me, to edit
>> them, and for users, to print them...a simple link to open the tiddler from
>> the modal...
>
>
> It's sort of a hack, but here's an example, using $action-listops to
> directly modify the $:/StoryList!!list field contents:
> <$button> open modal
>    <$action-setfield $tiddler="$:/temp/modal"
>       subtitle="Demo Modal"
>       text="Message goes here"
>       footer="""
>          <$button message="tm-close-tiddler"> close
>             <$action-deletetiddler $tiddler="$:/temp/modal"/>
>          </$button>
>          <$button message="tm-close-tiddler"> view
>             <$action-listops $tiddler="$:/StoryList"
> $subfilter="[[$:/temp/modal]]" />
>          </$button>
>          <$button message="tm-close-tiddler"> edit
>             <$navigator>
>             <$action-sendmessage $message="tm-edit-tiddler"
> $param="$:/temp/modal" />
>             <$action-listops $tiddler="$:/StoryList" $subfilter="[[Draft
> of '$:/temp/modal']]" />
>             </$navigator>
>          </$button>
>       """ />
>    <$action-sendmessage $message="tm-modal" $param="$:/temp/modal" />
> </$button>
>
> Notes:
> 1) The $action-listops puts the tiddler at the end of the
> $:/StoryList!!list
> 2) To move the tiddler to the start of the $:/StoryList!!list, you can
> use: $subfilter="[[$:/temp/modal]] +[putfirst[]]"
> 3) In either case, modifying the $:/StoryList!!list *does not scroll the
> tiddler into view*.
>
> enjoy,
> -e
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/UMRpPMVuHNY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/863490ca-20c0-4c8b-939a-32c58783e15eo%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/863490ca-20c0-4c8b-939a-32c58783e15eo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CANE%3DBFK7D9Y6hSf-YN-Ds2gtRKvyRptk2OgGKdwtv4rqKRASPg%40mail.gmail.com.

Reply via email to