[tw5] Trigger creation of tiddlers from url

Hello everyone,

For one of the projects I am working on, I need to be able to create tiddlers on the go from the url. So far, I am able to trigger the creation of a new tiddler by using the url :

mytiddlywiki.html#test

This creates a tiddler with the title test and the body is " Missing tiddler “test” – click to create" which is great!

Is there a way (or tools) to add more details about the tiddler only from the url? It would be amazing if the tag and body of the tiddler could be specified as well. For example something like :

mytiddlywiki.html#test[tags][body]

Would appreciate any input on this. Is there a better way to implement this feature on tiddlywiki?

Thanks!

G’day,

Here’s what I would do, involving a URL without the “#” :

https://intertwingularityslicendice.neocities.org/new_tid_url.html?action=createtid&name=howdy&template=this_template

Take a look at that TiddlyWiki instance.

You will see that upon startup, a startup tiddler checks for parameters in the URL.

The “action=createtid” parameter flags startup actions to create a new tiddler with the title specified and the template specified.

The TiddlyWiki is setup to show default tiddlers, including any tiddler tagged as “new_on_start”, including the tiddler just created and any previously created tiddlers for which we haven’t removed that tag.

This is a little different from what you had. We could also add some “post startup rendering” processing that sets all tiddlers tagged “new_on_start” in edit mode.

Cheers !

2 Likes

Oh wow. This is perfect! Thanks!

Good stuff.

If you find anything in there not fitting your workflow juuuuust right and need some help tweaking anything, have your people get a hold of my people !