mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-06 02:30:46 -08:00
Merge b5d2b79ca8 into 5cd3084298
This commit is contained in:
commit
5701dfc805
2 changed files with 22 additions and 3 deletions
|
|
@ -11,9 +11,13 @@ tags: $:/tags/ViewTemplate
|
|||
storyview="pop"
|
||||
variable="listItem"
|
||||
>
|
||||
<$let condition={{{ [<listItem>get[condition]] }}}>
|
||||
<%if [<condition>!is[blank]] :and[<currentTiddler>subfilter<condition>limit[1]] :else[<condition>is[blank]then[true]] %>
|
||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$set>
|
||||
<%endif%>
|
||||
</$let>
|
||||
</$list>
|
||||
</span>
|
||||
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
|
||||
|
|
|
|||
15
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9466.tid
Normal file
15
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9466.tid
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
title: $:/changenotes/5.4.0/#9466
|
||||
description: ViewToolbar buttons now support condition field
|
||||
tags: $:/tags/ChangeNote
|
||||
release: 5.4.0
|
||||
change-type: feature
|
||||
change-category: hackability
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9466
|
||||
github-contributors: linonetwo
|
||||
|
||||
ViewToolbar buttons can now be conditionally displayed based on the currentTiddler using a `condition` field. Similar to how `$:/tags/Exporter` and `$:/tags/EditorTools` already have. An example would be:
|
||||
|
||||
```tid
|
||||
tags: $:/tags/ViewToolbar
|
||||
condition: [<currentTiddler>type[text/x-markdown]] [<currentTiddler>type[text/markdown]]
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue