Wow! It works! Thank you so much Eric!
May I ask how to do this with the DetailsWidget as well? Can
action-sendmessage do anything with the DetailsWidget?
On Saturday, April 10, 2021 at 3:14:04 PM UTC+8 Eric Shulman wrote:
> On Friday, April 9, 2021 at 11:25:43 PM UTC-7 Sapphireslinger wrote:
>
>> ...the modal still comes up empty.
>>
>
> Try this:
>
> VideoTemplate:
> <div class="container">
> <iframe src={{!!url}} width="100%" height="315" frameborder="0"
> allowfullscreen class="video"></iframe>
> </div>
>
> VideoButtons:
> <$list filter="[tag[video]sort[title]]">
> <$button class="tc-btn-invisible tc-tiddlylink">
> <$view field="caption"><$view field="title"/></$view>
> <$action-sendmessage $message="tm-modal" $param="VideoTemplate"
> currentTiddler=<<currentTiddler>>/>
> </$button>
> </$list>
>
> TestVideo:
> *url*=https://www.youtube.com/embed/v2oi5DYuzEM
>
> Notes:
> 1) VideoTemplate: removed $list and added width and height params to iframe
> 2) VideoButtons: filter for [tag[video]]
> 3) VideoButtons: use $view caption with fallback handling to show title if
> no caption is set
> 4) VideoButtons: moved message, param and currentTiddler to
> $action-sendmessage in order to include the currentTiddler param ($button
> doesn't recognize extra params)
> 5) TestVideo: use YouTube *embed* URL
>
> enjoy,
> -e
>
--
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/138b7932-9a4d-43f7-a4f5-d9a7920802f2n%40googlegroups.com.