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:
Jermolene
2014-06-12 18:01:33 +01:00
parent 0e09fbf46a
commit 9ab0c84140
12 changed files with 211 additions and 52 deletions
+4
View File
@@ -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>