Help with Template Transclusion

97 views
Skip to first unread message

Eli B.

unread,
Jun 30, 2016, 12:21:29 PM6/30/16
to tiddl...@googlegroups.com
Hello everyone,

I've made a full Journal Template using various transclusions for headings, etc. which point to other tiddlers.


At the moment I enter each transclusion manually every time I write a journal, like so:


<--! this points to one tiddler for heading format-->

{{||A}}

<--! this points to another tiddler for another heading-->

{{||B}}

<--! and these point to other tiddlers, and so on-->

{{||C}}

{{||D}}

{{||E}}


What I'd like to create is a button that:

  • automatically enters all those transclusions into the body of a new tiddler
  • tags it as Journal
  • and places a date-stamp in the title field

With some outdated tutorials I've found, I've been able to place the template as a footer of a new tiddler; which is not what I'd like to accomplish. I feel like I'm so close, but yet so far. I've done a search in the forum but have not found a proper answer. Does anyone have any suggestions or can point me in the right direction?


Thanks.





Eli B.

unread,
Jun 30, 2016, 5:02:55 PM6/30/16
to TiddlyWiki
I did further research and was able to do the transclusions and tagging with one button. Now if I could only just add the date-stamp in the title field with the same button.

Mark S.

unread,
Jun 30, 2016, 7:08:42 PM6/30/16
to TiddlyWiki
It depends how you went about it. If you just used a button and an action widget, you can do something like this:

<$button>Make tiddler with date
<$action-sendmessage $message="tm-new-tiddler" title=<<now "Today is DDth, MMM YYYY">>  tags="OneTag [[Another Tag]]" text=/>
</$button>

Which uses the "now" macro with a date format string.

HTH
Mark

Eli B.

unread,
Jul 1, 2016, 3:18:44 AM7/1/16
to TiddlyWiki
Thanks for your answer, Mark. Someone else private-messaged me with a similar solution to yours that did the trick. I suspected the solution was simple but I was complicating it with extra steps and extra lingo.
Reply all
Reply to author
Forward
0 new messages