This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

WidgetMessage: tm-open-window

1st March 2022 at 4:21pm

The tm-open-window 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 paramObject are provided as variables to the new window.

NameDescription
param {default param}Title of the tiddler to be opened in a new browser window, defaults to currentTiddler if empty
templateTemplate in which the tiddler will be rendered
windowTitleTitle string for the opened window
widthWidth of the new browser window
heightHeight of the new browser window
left New in: 5.2.2 Optional, left position of new browser window
top New in: 5.2.2 Optional, top position of new browser window
windowID New in: 5.2.2 Optional, unique string used to identify the widow. Can be used with WidgetMessage: tm-close-window to close the window. Defaults to the value of param
{any other params}Any other parameters are made available as variables within the new window

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.

When used with the ActionSendMessageWidget, param becomes $param

Parameters template, windowTitle, width, height, left and top require the ActionSendMessageWidget.

New in: 5.2.2 To close a window opened with tm-open-window use WidgetMessage: tm-close-window

New in: 5.2.2 To open a tiddler in more than one new window, use a unique value for windowID


<$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>

That renders as: