An interesting side note about backward compatibility…
The syntax I used in the TiddlyTools/PrintTiddler toolbar button includes \procedure
and “substituted attribute values”, which were introduced in v5.3.0 (1st July 2023), and also “conditional shortcut syntax” (<%if ...>
), which was introduced in v5.3.2 (13th December 2023).
I decided to test TiddlyTools/PrintTiddler by importing it into the various “Beautiful Wikis” posted in the Cafe section. It was then that I noticed that some of these excellent wikis are based on older versions of the TWCore… some using v5.2.x, and even a few using v5.1.x. The result was that the toolbar button did not work and produced some very ugly display of the unrecognized syntax.
To address this, I’ve re-written a few bits and pieces of TiddlyTools/PrintTiddler.
Changed
\procedure print()
to
\define print()
Changed
<div style=`zoom:${[{$:/print!!zoom}]}$%;`>
and
<$transclude tiddler=`$:/core/ui/ViewTemplate${[{$:/print!!template}]}$`/>
to
<div style={{{ [[zoom:]addsuffix{$:/print!!zoom}addsuffix[%]] }}}>
and
<$transclude tiddler={{{ [[$:/core/ui/ViewTemplate]addsuffix{$:/print!!template}] }}}/>
Changed
<%if [<tv-config-toolbar-icons>match[yes]] %>{{$:/core/images/print-button}}<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>@@.tc-btn-text print@@<%endif%>
to
<$list filter="[<tv-config-toolbar-icons>match[yes]]">{{$:/core/images/print-button}}</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">@@.tc-btn-text print@@</$list>
These changes added just 50 bytes to the code, but allows TiddlyTools/PrintTiddler to work properly with some much older TiddlyWikis.
-e