mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Introduce $:/tags/Global tag
And also $:/tags/Global/View and $:/tags/Global/View/Body
This commit is contained in:
parent
1f35b945a5
commit
3da0a9431c
@ -1149,7 +1149,7 @@ exports.makeTranscludeWidget = function(title,options) {
|
|||||||
if(options.importVariables) {
|
if(options.importVariables) {
|
||||||
parseTreeImportVariables.attributes.filter.value = options.importVariables;
|
parseTreeImportVariables.attributes.filter.value = options.importVariables;
|
||||||
} else if(options.importPageMacros) {
|
} else if(options.importPageMacros) {
|
||||||
parseTreeImportVariables.attributes.filter.value = "[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]";
|
parseTreeImportVariables.attributes.filter.value = this.getTiddlerText("$:/core/config/GlobalImportFilter");
|
||||||
}
|
}
|
||||||
parseTreeDiv.tree[0].children.push(parseTreeImportVariables);
|
parseTreeDiv.tree[0].children.push(parseTreeImportVariables);
|
||||||
parseTreeImportVariables.children.push(parseTreeTransclude);
|
parseTreeImportVariables.children.push(parseTreeTransclude);
|
||||||
|
@ -3,5 +3,5 @@ title: $:/core/templates/exporters/StaticRiver/Content
|
|||||||
\define renderContent()
|
\define renderContent()
|
||||||
{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}
|
{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}
|
||||||
\end
|
\end
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
<<renderContent>>
|
<<renderContent>>
|
||||||
|
@ -7,5 +7,5 @@ condition: [<count>compare:lte[1]]
|
|||||||
\define renderContent()
|
\define renderContent()
|
||||||
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}
|
||||||
\end
|
\end
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
<<renderContent>>
|
<<renderContent>>
|
@ -1,7 +1,7 @@
|
|||||||
title: $:/core/save/all-external-js
|
title: $:/core/save/all-external-js
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
title: $:/core/save/offline-external-js
|
title: $:/core/save/offline-external-js
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
title: $:/core/save/all
|
title: $:/core/save/all
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
|
@ -2,7 +2,7 @@ title: $:/core/templates/server/static.tiddler.html
|
|||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define tv-wikilink-template() $uri_encoded$
|
\define tv-wikilink-template() $uri_encoded$
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
@ -4,7 +4,7 @@ title: $:/core/templates/single.tiddler.window
|
|||||||
\define containerClasses()
|
\define containerClasses()
|
||||||
tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$
|
tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$
|
||||||
\end
|
\end
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
|
||||||
<$vars
|
<$vars
|
||||||
tv-config-toolbar-icons={{$:/config/Toolbar/Icons}}
|
tv-config-toolbar-icons={{$:/config/Toolbar/Icons}}
|
||||||
|
@ -4,7 +4,7 @@ title: $:/core/templates/static.tiddler.html
|
|||||||
\define tv-config-toolbar-icons() no
|
\define tv-config-toolbar-icons() no
|
||||||
\define tv-config-toolbar-text() no
|
\define tv-config-toolbar-text() no
|
||||||
\define tv-config-toolbar-class() tc-btn-invisible
|
\define tv-config-toolbar-class() tc-btn-invisible
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
`<!doctype html>
|
`<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -211,7 +211,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|||||||
</div>
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@ -2,7 +2,7 @@ title: $:/core/ui/EditTemplate/body/preview/output
|
|||||||
tags: $:/tags/EditPreview
|
tags: $:/tags/EditPreview
|
||||||
caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}}
|
caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}}
|
||||||
|
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]] [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!has[draft.of]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]]
|
||||||
<$set name="tv-tiddler-preview" value="yes">
|
<$set name="tv-tiddler-preview" value="yes">
|
||||||
|
|
||||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} />
|
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} />
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
title: $:/core/ui/PageStylesheet
|
title: $:/core/ui/PageStylesheet
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
<$set name="currentTiddler" value={{$:/language}}>
|
<$set name="currentTiddler" value={{$:/language}}>
|
||||||
|
@ -4,7 +4,7 @@ description: {{$:/language/PageTemplate/Description}}
|
|||||||
icon: $:/core/images/layout-button
|
icon: $:/core/images/layout-button
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
|
||||||
<$vars
|
<$vars
|
||||||
tv-config-toolbar-icons={{$:/config/Toolbar/Icons}}
|
tv-config-toolbar-icons={{$:/config/Toolbar/Icons}}
|
||||||
|
@ -5,10 +5,10 @@ title: $:/core/ui/ViewTemplate
|
|||||||
$:/state/folded/$(currentTiddler)$
|
$:/state/folded/$(currentTiddler)$
|
||||||
\end
|
\end
|
||||||
\define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/>
|
\define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/>
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]]
|
||||||
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
|
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
|
||||||
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article">
|
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!is[draft]]" variable="listItem">
|
||||||
<$transclude tiddler=<<listItem>>/>
|
<$transclude tiddler=<<listItem>>/>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
title: $:/core/ui/ViewTemplate/body
|
title: $:/core/ui/ViewTemplate/body
|
||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!has[draft.of]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]]
|
||||||
|
|
||||||
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
||||||
|
|
||||||
|
2
core/wiki/config/GlobalImportFilter.tid
Normal file
2
core/wiki/config/GlobalImportFilter.tid
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
title: $:/core/config/GlobalImportFilter
|
||||||
|
text: [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]]
|
@ -5,7 +5,7 @@ title: $:/core/ui/ViewTemplate
|
|||||||
$:/state/folded/$(currentTiddler)$
|
$:/state/folded/$(currentTiddler)$
|
||||||
\end
|
\end
|
||||||
\define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/>
|
\define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/>
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]]
|
||||||
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
|
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
|
||||||
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}>
|
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}>
|
||||||
<$set name="state" value={{{ [[$:/state/viewtemplate/visibility/]addsuffix<currentTiddler>] }}}>
|
<$set name="state" value={{{ [[$:/state/viewtemplate/visibility/]addsuffix<currentTiddler>] }}}>
|
||||||
|
@ -5,7 +5,7 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
\define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html
|
\define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html
|
||||||
|
|
||||||
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
<$importvariables filter={{$:/core/config/GlobalImportFilter}}>
|
||||||
|
|
||||||
Bienvenue sur <<tw>>, un carnet de notes personnel web et non-linéaire que tout le monde peut utiliser et conserver, sans dépendre d'une quelconque entreprise.
|
Bienvenue sur <<tw>>, un carnet de notes personnel web et non-linéaire que tout le monde peut utiliser et conserver, sans dépendre d'une quelconque entreprise.
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ Special tags assign special behaviour or appearance to all of the tiddlers to wh
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
* $:/tags/Macro causes the macros defined in a tiddler to be available globally
|
* $:/tags/Global causes the definitions in a tiddler to be available globally
|
||||||
* $:/tags/Stylesheet causes the tiddler to be interpreted as a CSS stylesheet
|
* $:/tags/Stylesheet causes the tiddler to be interpreted as a CSS stylesheet
|
||||||
* $:/tags/SideBar causes the tiddler to be displayed as a sidebar tab
|
* $:/tags/SideBar causes the tiddler to be displayed as a sidebar tab
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ The initial startup actions are useful for customising TiddlyWiki according to e
|
|||||||
Note that global macros are not available within initial startup action tiddlers by default. If you need to access them then you'll need to explicitly include them with an [[Pragma: \import]] at the top of the tiddler:
|
Note that global macros are not available within initial startup action tiddlers by default. If you need to access them then you'll need to explicitly include them with an [[Pragma: \import]] at the top of the tiddler:
|
||||||
|
|
||||||
```
|
```
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
```
|
```
|
||||||
|
|
||||||
!! Post-Render Startup Actions
|
!! Post-Render Startup Actions
|
||||||
|
@ -77,11 +77,11 @@ In the [[Keyboard Shortcuts Tab|$:/core/ui/ControlPanel/KeyboardShortcuts]] the
|
|||||||
> If the tiddler has the tag <<tag $:/tags/KeyboardShortcut>>, the field ''key'' with the [[Keyboard Shortcut Descriptor]] as its value and some actions in its text field, the actions will be triggered when the mechanism detects the configured key-combination
|
> If the tiddler has the tag <<tag $:/tags/KeyboardShortcut>>, the field ''key'' with the [[Keyboard Shortcut Descriptor]] as its value and some actions in its text field, the actions will be triggered when the mechanism detects the configured key-combination
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<$macrocall $name=".tip" _="""''Macros'' defined ''outside'' a global keyboard-shortcut (through a tiddler tagged `$:/tags/Macro`) need to be ''imported'' in order to be accessible.
|
<$macrocall $name=".tip" _="""''Macros'' defined ''outside'' a global keyboard-shortcut (through a tiddler tagged `$:/tags/Global`) need to be ''imported'' in order to be accessible.
|
||||||
The [[import pragma|Pragma]] can be used for that"""/>
|
The [[import pragma|Pragma]] can be used for that"""/>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
If the tiddler that contains the macro definition is known and - for example - titled `my-macro-tiddler`
|
If the tiddler that contains the macro definition is known and - for example - titled `my-macro-tiddler`
|
||||||
|
@ -13,5 +13,5 @@ The ''\import'' [[pragma|Pragmas]] is used to import definitions from other tidd
|
|||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
\import [all[shadows+tiddlers]tag[$:/tags/Macro]]
|
\import [all[shadows+tiddlers]tag[$:/tags/Global]]
|
||||||
```
|
```
|
||||||
|
@ -34,10 +34,10 @@ Procedures are implemented as a special kind of [[variable|Variables]] and so in
|
|||||||
|
|
||||||
The [[Pragma: \import]] or <<.wlink ImportVariablesWidget>> widget can be used to copy procedure definitions from another tiddler.
|
The [[Pragma: \import]] or <<.wlink ImportVariablesWidget>> widget can be used to copy procedure definitions from another tiddler.
|
||||||
|
|
||||||
!! `$:/tags/Macro` Tag
|
!! `$:/tags/Global` Tag
|
||||||
|
|
||||||
Global procedures can be defined using the [[SystemTag: $:/tags/Macro]].
|
Global procedures can be defined using the [[SystemTag: $:/tags/Global]].
|
||||||
|
|
||||||
The tag [[SystemTag: $:/tags/Macro/View]] is used to define procedures that should only be available within the main view template and the preview panel.
|
The tag [[SystemTag: $:/tags/Global/View]] is used to define procedures that should only be available within the main view template and the preview panel.
|
||||||
|
|
||||||
The tag [[SystemTag: $:/tags/Macro/View/Body]] is used to define procedures that should only be available within the main view template body and the preview panel.
|
The tag [[SystemTag: $:/tags/Global/View/Body]] is used to define procedures that should only be available within the main view template body and the preview panel.
|
||||||
|
@ -4,7 +4,7 @@ title: ReadMe
|
|||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html
|
\define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
|
||||||
Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.
|
Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ tags: $:/tags/RawMarkupWikified/TopBody
|
|||||||
title: $:/SplashScreen
|
title: $:/SplashScreen
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
|
||||||
\procedure show-icon(title)
|
\procedure show-icon(title)
|
||||||
<$wikify name="icon" text={{{ [<title>addprefix[{{]addsuffix[}}]] }}} output="html">
|
<$wikify name="icon" text={{{ [<title>addprefix[{{]addsuffix[}}]] }}} output="html">
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
caption: $:/tags/Global
|
||||||
|
created: 20230419103154329
|
||||||
|
description: marks global definitions
|
||||||
|
modified: 20230419103154329
|
||||||
|
tags: SystemTags
|
||||||
|
title: SystemTag: $:/tags/Global
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
The [[system tag|SystemTags]] `$:/tags/Global` marks global definitions that are made available everywhere.
|
@ -0,0 +1,9 @@
|
|||||||
|
caption: $:/tags/Global/View
|
||||||
|
created: 20230419103154329
|
||||||
|
description: marks global definitions only active in View template
|
||||||
|
modified: 20230419103154329
|
||||||
|
tags: SystemTags
|
||||||
|
title: SystemTag: $:/tags/Global/View
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
The [[system tag|SystemTags]] `$:/tags/Global/View` marks definitions that are only made available within the main view templates and the preview panel.
|
@ -0,0 +1,9 @@
|
|||||||
|
caption: $:/tags/Global/View/Body
|
||||||
|
created: 20230419103154329
|
||||||
|
description: marks global definitions only active in View template body
|
||||||
|
modified: 20230419103154329
|
||||||
|
tags: SystemTags
|
||||||
|
title: SystemTag: $:/tags/Global/View/Body
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
The [[system tag|SystemTags]] `$:/tags/Global/View/Body` marks definitions that are only made available within the main view template bodies and the preview panel.
|
@ -6,4 +6,4 @@ tags: SystemTags
|
|||||||
title: SystemTag: $:/tags/Macro
|
title: SystemTag: $:/tags/Macro
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros
|
The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros. It is now deprecated in favour of [[SystemTag $:/tags/Global]].
|
@ -6,4 +6,4 @@ tags: SystemTags
|
|||||||
title: SystemTag: $:/tags/Macro/View
|
title: SystemTag: $:/tags/Macro/View
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
The [[system tag|SystemTags]] `$:/tags/Macro/View` marks macros that are only made available within the main view templates and the preview panel.
|
The [[system tag|SystemTags]] `$:/tags/Macro/View` marks macros that are only made available within the main view templates and the preview panel. It is now deprecated in favour of [[SystemTag $:/tags/Global/View]].
|
||||||
|
@ -6,4 +6,4 @@ tags: SystemTags
|
|||||||
title: SystemTag: $:/tags/Macro/View/Body
|
title: SystemTag: $:/tags/Macro/View/Body
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
The [[system tag|SystemTags]] `$:/tags/Macro/View/Body` marks macros that are only made available within the main view template bodies and the preview panel.
|
The [[system tag|SystemTags]] `$:/tags/Macro/View/Body` marks macros that are only made available within the main view template bodies and the preview panel. It is now deprecated in favour of [[SystemTag $:/tags/Global/View/Body]].
|
||||||
|
@ -22,7 +22,7 @@ title: $:/plugins/tiddlywiki/blog/templates/html-page/page
|
|||||||
<body class="tc-body">
|
<body class="tc-body">
|
||||||
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
|
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
|
||||||
<section class="tc-story-river">
|
<section class="tc-story-river">
|
||||||
`<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
`<$importvariables filter={{$:/core/config/GlobalImportFilter}}>
|
||||||
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/tiddler" format="htmlwikified"/>
|
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/tiddler" format="htmlwikified"/>
|
||||||
</$importvariables>`
|
</$importvariables>`
|
||||||
</section>
|
</section>
|
||||||
|
@ -22,7 +22,7 @@ title: $:/plugins/tiddlywiki/blog/templates/html-page/post
|
|||||||
<body class="tc-body">
|
<body class="tc-body">
|
||||||
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
|
`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`
|
||||||
<section class="tc-story-river">
|
<section class="tc-story-river">
|
||||||
`<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
|
`<$importvariables filter={{$:/core/config/GlobalImportFilter}}>
|
||||||
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/tiddler" format="htmlwikified"/>
|
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/tiddler" format="htmlwikified"/>
|
||||||
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/menu" format="htmlwikified"/>
|
<$view tiddler="$:/plugins/tiddlywiki/blog/templates/menu" format="htmlwikified"/>
|
||||||
</$importvariables>`
|
</$importvariables>`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
title: $:/plugins/tiddlywiki/tiddlyweb/save/offline
|
title: $:/plugins/tiddlywiki/tiddlyweb/save/offline
|
||||||
|
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
[is[tiddler]] -[[$:/boot/boot.css]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[prefix[$:/temp/]] +[sort[title]] $(publishFilter)$
|
[is[tiddler]] -[[$:/boot/boot.css]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[prefix[$:/temp/]] +[sort[title]] $(publishFilter)$
|
||||||
\end
|
\end
|
||||||
|
Loading…
Reference in New Issue
Block a user