1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-08 04:54:23 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid

38 lines
1.8 KiB
Plaintext

caption: tm-open-window
created: 20160424181447704
modified: 20220227212704337
tags: Messages
title: WidgetMessage: tm-open-window
type: text/vnd.tiddlywiki
The `tm-open-window` [[message|Message]] opens a tiddler in a new //browser// window. If no parameters are specified, the current tiddler is opened in a new window. Similiar to `tm-modal` any additional parameters passed via the <<.param "paramObject">> are provided as variables to the new window.
|!Name |!Description |
|param |Title of the tiddler to be opened in a new browser window, defaults to <<.var "currentTiddler">> if empty |
|template |Template tiddler used to render the tiddler in the new browser window |
|windowTitle |Title for the new browser window |
|width |Width of the new browser window (in pixels without units) |
|height |Height of the new browser window (in pixels without units) |
|paramObject |Hashmap of variables to be provided to the template, contains all extra parameters passed to the widget sending the message |
The `tm-open-window` message is best generated with the ActionSendMessageWidget, which in turn is triggered by a widget such as the ButtonWidget. The message is handled by the core itself.
<<.tip """When used with the ActionSendMessageWidget, <<.param 'param'>> becomes <<.param '$param'>> """>>
<<.tip """The parameters <<.param template>>, <<.param windowTitle>>, <<.param width>>, and <<.param height>> ''require'' the ActionSendMessageWidget.""">>
<$macrocall $name='wikitext-example-without-html'
src="""
<$button>Open Window
<$action-sendmessage
$message="tm-open-window"
$param="$:/temp/openme"
template="SampleWindowTemplate"
windowTitle="My Window Title"
width="640"
height="480"
something="This is my new window. There are many like it, but this one is mine." />
</$button>
""" />