Jean-Pierre,

The default if the type setting is not set is text/vnd.tiddlywiki so you do 
not need to set it.

if your need "type" for some other reason you can "assume"  this value if 
blank

{{{ [all[current]get[type]] ~[[text/vnd.tiddlywiki]] }}}

*However one of the most powerful methods you can learn in tiddlywiki is a 
button is a trigger and actions are triggered.*
*The following is not tested and done from memory please make a copy of 
your wiki before testing.*

\define action-s()
Action widgets here
\end
<$button actions=<<action-s>
<<actions>>
button title
</$button>

   - The above acts on the current tiddler if relevant
   - But you can use wiki text inside buttons or actions, the parameter 
   version "actions=<<macro containing actions>>" is the recommended one.
   - You could wrap the above in a list to create a button for each tiddler

However when reformatting tiddlers, doing bulk actions we do this
<$button>
<$list filter="tiddler-filter">>
"actions"
</$list>
button title
</$button>

To change all blank type fields to
<$button>
<$list filter="[!is[system]get[type]is[blank]]">
<$action-setfield type="text/vnd.tiddlywiki"/>
</$list>
button title
</$button>
Warning be selective what you change, if you changes system tiddlers you 
may overwrite every system tiddler.


I still do know what you need to do this give that is the default type but 
the above allows you do do anything with one button click you can achieve 
with action macros 
<file:///C:/Data/TW5/!TiddlyWiki.com/tiddlywiki.com.html#ActionWidgets>or 
send message <https://tiddlywiki.com/#Messages> and the messages and wiki 
text to prepare them. 

See https://tiddlywiki.com/#FieldManglerWidget for four messages that 
require use of the fieldmangler widget as well.

Finally modify the new tiddler button or create your own to set the type 
every time you create a tiddler. But this is not necessary.
 
Feel free to ask more questions.

Tones

On Tuesday, 27 October 2020 09:42:05 UTC+11, Jean-Pierre Rivière wrote:
>
> I my wiki, I have often forgotten to put the type as tw5 wikitext. I have 
> not been able to set this as the default type BTW (any idea?)
>
> I can list all such relevant tiddlers with:
>
> <$list filter="[field:type[]!prefix[$:/]]"> %% <$link/></$list>
>
> and then correct them all manually. Could I manage to do it automatically? 
> Perhaps passing by a button an,d an activation mechanism would help?
>

-- 
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/3feeab60-8485-4924-91b5-ccce1b78ee4eo%40googlegroups.com.

Reply via email to