mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-01 14:28:07 +00:00
Add "cascade" filter run prefix and use it to control view templates (#6168)
* Initial Commit
* Set currentTiddler and ..currentTiddler for filter evaulation
* Precompile the filters for performance
* Add explicit test for empty result when no filter passes
* Use the cascade filter run prefix to choose the view template body template
* Use the cascade mechanism to choose between the edit and view templates
* Simplify cascade filter
Thanks @saqimtiaz
* Add control panel UI for inspecting the template cascades
* Refactor import listing and plugin listing as alternate body templates
As suggested by @pmario
* Refer to $:/core/ui/{View|Edit}Template via their associated config tiddlers
* Fix typo in previous commit
* Add demo of custom story tiddler template
* Tweak control panel wording
* Standardise "Story Tiddler Template" nomenclature
* Add a cascade for the editor template body
* Add a cascade for the view template title
* Avoid unwanted whitespace
* Add a cascade for dynamically choosing tiddler icons
This commit is contained in:
9
core/ui/ControlPanel/Cascades/EditTemplateBody.tid
Normal file
9
core/ui/ControlPanel/Cascades/EditTemplateBody.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/EditTemplateBody
|
||||
tags: $:/tags/ControlPanel/Cascade
|
||||
caption: {{$:/language/ControlPanel/EditTemplateBody/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/EditTemplateBody/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/EditTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
||||
9
core/ui/ControlPanel/Cascades/StoryTiddler.tid
Normal file
9
core/ui/ControlPanel/Cascades/StoryTiddler.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/StoryTiddler
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/StoryTiddler/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/StoryTiddler/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/StoryTiddlerTemplateFilter||$:/snippets/ListTaggedCascade}}
|
||||
9
core/ui/ControlPanel/Cascades/TiddlerIcon.tid
Normal file
9
core/ui/ControlPanel/Cascades/TiddlerIcon.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/TiddlerIcon
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/TiddlerIcon/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/TiddlerIcon/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/TiddlerIconFilter||$:/snippets/ListTaggedCascade}}
|
||||
9
core/ui/ControlPanel/Cascades/ViewTemplateBody.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateBody.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateBody
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateBody/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateBody/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateBodyFilter||$:/snippets/ListTaggedCascade}}
|
||||
9
core/ui/ControlPanel/Cascades/ViewTemplateTitle.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateTitle.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateTitle
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateTitle/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateTitle/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateTitleFilter||$:/snippets/ListTaggedCascade}}
|
||||
Reference in New Issue
Block a user