[TW5] Is it possible to make a button that creates a tiddler with multiple tags?

574 views
Skip to first unread message

Captain Packers

unread,
Dec 18, 2014, 11:51:34 AM12/18/14
to tiddl...@googlegroups.com
Is it possible to make a button that creates a tiddler with multiple tags?

I'm using this construct:

<$set name="tag" value="Journal">
<$newtiddler title=<<dateTime "Journal of YYYY-0MM-0DD">> skeleton="base_skeleton" edit="yes">New Journal Entry</$newtiddler>
</$set>

I'd like to add a second tag, like a project name, but can't figure out how to make it work.

Thanks.
Captain Packers

Tobias Beer

unread,
Dec 18, 2014, 1:12:22 PM12/18/14
to tiddl...@googlegroups.com
You seem to be using a widget that is not in the core: $newtiddler.
What is it and how does it work?

Best wishes, Tobias.

Jed Carty

unread,
Dec 18, 2014, 2:23:20 PM12/18/14
to tiddl...@googlegroups.com
If you use multiple action-sendmessage widgets that each use the tm-add-tag message you can add as many tags as you want. Since the implementation of the action widgets the core can do everything that the newtiddler widget does. You could also use a template that has the desired tags and the tm-new-tiddler message.

Tobias Beer

unread,
Dec 18, 2014, 3:25:22 PM12/18/14
to tiddl...@googlegroups.com
I assume we're talking about the newtiddler widget from...


Yes, I'd join Jed in saying that those messages do the trick quite nicely these days.

See the new-journal-here button as an example...


Best wishes, Tobias.

Captain Packers

unread,
Jan 29, 2015, 5:39:36 PM1/29/15
to tiddl...@googlegroups.com
I can't quite get the code right to add the second "Journal" tag. I'm using tags={{!!tags}} to pick up the tags of the current tiddler, but then I would like to add "Journal". Here's what I've got:

<$button>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "Tableau Product Development Journal of YY-0MM0DD">> tags={{!!tags}} /> Button Text
<$action-sendmessage $message="tm-add-tag" $param="Journal" />
</$button>

Tobias Beer

unread,
Jan 29, 2015, 6:14:43 PM1/29/15
to tiddl...@googlegroups.com
Here's one way to do it...

Custom New Journal Button @ tb5

\define set-tags() $(tags)$ Journal

<$set name="tags" value={{!!tags}}>

<$button>
<$action-sendmessage
$message
="tm-new-tiddler"
title
=<<now "Tableau Product Development Journal of YY-0MM0DD">>

tags
=<<set-tags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/
core/images/new-journal-button}}
</$list>
New Custom Journal
</
$button>
</$set>

Best wishes, Tobias. 
Message has been deleted

Captain Packers

unread,
Jan 30, 2015, 10:23:41 AM1/30/15
to
Tobias,

Thanks. That example helps a lot.

In the process of working up a new custom journal button, I've come across a really odd TW behavior. The letter 'p' in Development in the tittle is being translated to the letter 'a'. Something to do with the now macro and the juxtaposition of 'pm' perhaps??? If I misspell Development as Developement it comes out fine.

This is really baffling.

P.S. I like what you've done with GDT at tb5.tiddlyspot.com
Reply all
Reply to author
Forward
0 new messages