mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-29 20:51:43 +00:00
Support global macros via the importvariables widget
The new importvariables widget imports macro/variable definitions from the specified tiddlers and makes them available to its children. Allows us to split PageMacros up into separate tiddlers. We still support loading macros from $:/core/ui/PageMacros to help people upgrading. Fixes #644 and #559
This commit is contained in:
@@ -4,6 +4,8 @@ title: $:/core/ui/PageTemplate
|
||||
tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$
|
||||
\end
|
||||
|
||||
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
||||
|
||||
<$set name="themeTitle" value={{$:/view}}>
|
||||
|
||||
<$set name="currentTiddler" value={{$:/language}}>
|
||||
@@ -37,3 +39,5 @@ tw-page-container tw-page-view-$(themeTitle)$ tw-language-$(languageTitle)$
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
|
||||
</$importvariables>
|
||||
|
||||
Reference in New Issue
Block a user