From b7746b0c55fff41e2d782c540099540fb510fa32 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 23 Mar 2018 11:48:48 +0000 Subject: [PATCH] Docs update for startup actions --- editions/tw5.com/tiddlers/features/StartupActions.tid | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/features/StartupActions.tid b/editions/tw5.com/tiddlers/features/StartupActions.tid index 33f6719ff..4ae567beb 100644 --- a/editions/tw5.com/tiddlers/features/StartupActions.tid +++ b/editions/tw5.com/tiddlers/features/StartupActions.tid @@ -10,7 +10,7 @@ During startup, TiddlyWiki executes any ActionWidgets found in tiddlers with the * <> (only executed when running in the browser) * <> (only executed when running under Node.js) -For example, the following action widgets when placed in a tiddler tagged <> will cause the sidebar to be hidden by default when the screen width is less than 1000 pixels: +Startup actions are useful for customising TiddlyWiki according to environmental factors such as the screen size. For example, the following action widgets when placed in a tiddler tagged <> will cause the sidebar to be hidden by default when the screen width is less than 1000 pixels: ``` <$reveal type="lt" state="$:/info/browser/screen/width" text="3000"> @@ -21,3 +21,11 @@ For example, the following action widgets when placed in a tiddler tagged < ``` + +Note that global macros are not available within startup action tiddlers by default. If you need to access them then you'll need to explicitly include them: + +``` +<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"> +...actions that depend upon global macros... + +```