well, if such kind of information is so welcomed, I've an addition to the 
interpreter-template. I want to have for a special branch in my TW the 
option for interpretation e.g. JSON-Tiddler. The <$reveal>-Widget is very 
handy in combination with the CSS to hide the normal 
Tiddler-Interpretation. Mohammad helped me with this very much. Here the 
conclusion:

Target: Customized Template-View for Tiddler
Conclusion (in short)
- Tiddly Wiki adds the own defined Template simply to it's own output.
- Hiding this output via CSS ==> Resulting displaying the customized output.

Solution: 
https://kookma.github.io/TW-Scripts/#Conditionally%20Display%20The%20Tiddler%20Contents

Selectors for CSS see here:

   - https://tiddlywiki.com/prerelease/#Custom%20styles%20by%20data-tags
   - https://tiddlywiki.com/prerelease/#Custom%20Styles%20FAQ
   
Another HTML-Attribute to apply this filter may be the tiddler title stored 
in data-tiddler-title for filtering in given trees of tags. Here the 
filtering of the beginning (e.g. 
🗝:/ as a name-space for passwords.)
(See Tree-Macro <https://tiddlywiki.com/#tree%20Macro> and 
Table-Of-Content-Macros <https://tiddlywiki.com/#Table-of-Contents%20Macros>
.)

Thanks to Mohammad and others collecting the information.


Now - not all tiddler in this branch are JSON-Tiddler. So I add to the 
interpretation these codes:

<$list filter="[all[current]tag[network]]">
<$reveal type="match" state="!!type" text="application/json">
testKey: {{##testKey}}
<$edit-text tiddler=<<currentTiddler>> index="testKey" tag="input" />
</$reveal>

<$reveal type="nomatch" state="!!type" text="application/json">
<$view />
</$reveal>

</$list>


The reveal only interpretes the tiddler only with the given template, if it 
has type JSON. Otherwise it will display the content as normal TW-Text. You 
can also add other protections like version-fields and so on, but I think 
the basic ideas is visible.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ebd53b25-16fd-439b-9305-bbbe5a35e876%40googlegroups.com.

Reply via email to