mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-29 15:30:47 +00:00
Use the cascade filter run prefix to choose the view template body template
This commit is contained in:
parent
ee32eb909f
commit
b1cb211f21
@ -3,14 +3,10 @@ tags: $:/tags/ViewTemplate
|
||||
|
||||
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
|
||||
|
||||
<$list filter="[all[current]!has[plugin-type]!field:hide-body[yes]]">
|
||||
<$let template={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]get[text]] }}}>
|
||||
|
||||
<$transclude>
|
||||
<$transclude tiddler={{{ [<template>!is[blank]] ~[[$:/core/ui/ViewTemplate/body/default]] }}}/>
|
||||
|
||||
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
||||
|
||||
</$transclude>
|
||||
|
||||
</$list>
|
||||
</$let>
|
||||
|
||||
</$reveal>
|
||||
|
3
core/ui/ViewTemplate/body/blank.tid
Normal file
3
core/ui/ViewTemplate/body/blank.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/ViewTemplate/body/blank
|
||||
|
||||
<!-- Intentionally blank -->
|
3
core/ui/ViewTemplate/body/code.tid
Normal file
3
core/ui/ViewTemplate/body/code.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/core/ui/ViewTemplate/body/code
|
||||
|
||||
<$codeblock code={{{ [<currentTiddler>get[text]] }}} language={{{ [<currentTiddler>get[type]else[text/vnd.tiddlywiki]] }}}/>
|
7
core/ui/ViewTemplate/body/default.tid
Normal file
7
core/ui/ViewTemplate/body/default.tid
Normal file
@ -0,0 +1,7 @@
|
||||
title: $:/core/ui/ViewTemplate/body/default
|
||||
|
||||
<$transclude>
|
||||
|
||||
<$transclude tiddler="$:/language/MissingTiddler/Hint"/>
|
||||
|
||||
</$transclude>
|
7
core/wiki/config/ViewTemplateBodyFilters.multids
Normal file
7
core/wiki/config/ViewTemplateBodyFilters.multids
Normal file
@ -0,0 +1,7 @@
|
||||
title: $:/config/ViewTemplateBodyFilters/
|
||||
tags: $:/tags/ViewTemplateBodyFilter
|
||||
|
||||
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/]!field:title[$:/core/readme]!field:title[$:/core/icon]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
||||
plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/blank]]
|
||||
hide-body: [field:hide-body[yes]then[$:/core/ui/ViewTemplate/body/blank]]
|
||||
default: [[$:/core/ui/ViewTemplate/body/default]]
|
3
core/wiki/tags/ViewTemplateBodyFilter.tid
Normal file
3
core/wiki/tags/ViewTemplateBodyFilter.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/tags/ViewTemplateBodyFilter
|
||||
list: $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/default
|
||||
|
Loading…
Reference in New Issue
Block a user