[TW5] Button to create new task tagged with current tiddler?

545 views
Skip to first unread message

Matthew Petty

unread,
May 11, 2015, 3:26:47 AM5/11/15
to tiddl...@googlegroups.com
I use a button to create task tiddlers. It uses a TaskSkeleton to create consistently formatted tiddlers.
I want to add a button to the skeleton which would create a new task, tagged with the current task, which would also use the TaskSkeleton.
The "new here" button just creates a new empty tiddler, and it's only accessible in view mode.

I think it's just a case of making a new task creation button, based on the current one. Here's TaskButton:
<$let tag1="journal" text="">
<$newtiddler title=<
<dateTime 'YYYY 0MM 0DD ddd hh:mm:ss'>> skeleton="TaskSkeleton" edit="yes">Create Task "<<dateTime 'YYYY 0MM 0DD ddd hh:mm:ss'>>"</$newtiddler>
</$let>

What could I add to that to tag the new task with the tiddler that displayed this button?

Måns

unread,
May 16, 2015, 4:08:02 AM5/16/15
to tiddl...@googlegroups.com
Hi Matthew

Which version of TW5 are you using? I doubt that your skeleton code will work in an up to date version of TW5.


You could clone the new-journal-here button* and use it as a template to create your own special NewTaskJournalHere button.


Cheers Måns Mårtensson

Måns

unread,
May 16, 2015, 4:29:09 AM5/16/15
to tiddl...@googlegroups.com

Måns

unread,
May 16, 2015, 5:35:37 AM5/16/15
to tiddl...@googlegroups.com
Hi Matthew

I made my own taskJornalHere button like this: (check out a live example at: My playground


[[2015 05 16 Sat 11:6:48]]

1 second ago
  
Probability:3-sometimes
Tagged titles: 

NewTaskJournalHere:

\define taskJournalButtonTags()
[[$(currentTiddlerTag)$]] $(taskJournalTags)$
\end
\define taskJournalButton()
<$button tooltip={{NewTaskJournalHere!!hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(taskJournalTitleTemplate)$">> text=<<taskJournalTextTemplate>> tags=<<taskJournalButtonTags>>/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{NewTaskJournalHere!!caption}}/></span>
</$list>
</$button>
\end
<$set name="taskJournalTitleTemplate" value={{NewTaskJournalHere!!titletemplate}}>
<$set name="taskJournalTags" value={{NewTaskJournalHere!!tagtemplate}}>
<$set name="currentTiddlerTag" value=<<currentTiddler>>>
<$set name="taskJournalTextTemplate" value={{NewTaskJournalHere!!texttemplate}}>
<<taskJournalButton>>
</$set></$set></$set>

captionNew task journal here
created20150516073545040
description{{$:/language/Buttons/NewJournalHere/Hint}}
hintCreate a new task journal tiddler tagged with this one
modified20150516090641920
tags$:/tags/ViewToolbar
tagtemplateJournal Task
texttemplate{{||tasktemplate}}
titleNewTaskJournalHere
titletemplate
YYYY 0MM 0DD ddd hh:mm:ss

Mat

unread,
May 16, 2015, 7:46:45 AM5/16/15
to tiddl...@googlegroups.com
@Måns - I hadn't realized you could paste in html like this - because that's what you've done, right? Copy-pasted the tiddler code right into your post, right?

The dropdown even works (even if I somehow managed to split it(!) now as I repost)

<:-)

Måns

unread,
May 16, 2015, 8:28:01 AM5/16/15
to tiddl...@googlegroups.com
Hi Mat


>I hadn't realized you could paste in html like this - because that's what you've done, right? Copy-pasted the tiddler code right into your post, right?

Yep. It's very convenient isn't it? :-)

Cheers Måns Mårtensson 

Birthe C

unread,
May 16, 2015, 1:13:37 PM5/16/15
to tiddl...@googlegroups.com
Hi Matthew,
Did you get newtiddler widget from http://tiddlystuff.tiddlyspot.com ? Are you sure you updated it?

Maybe you can use this example: http://p-task.tiddlyspot.com/


Birthe

Mark S.

unread,
May 21, 2015, 11:00:05 AM5/21/15
to tiddl...@googlegroups.com
Hi Måns,

Google, or something, breaks your "My playground" link. Could you paste the url?

Thanks!
Mark

Birthe C

unread,
May 21, 2015, 11:23:34 AM5/21/15
to tiddl...@googlegroups.com
Hi Mark S,

The link to Måns playground: http://playground.tiddlyspot.com/


Birthe

Måns

unread,
May 21, 2015, 11:45:56 AM5/21/15
to tiddl...@googlegroups.com
Hi Birthe & Mark

The tiddlers might be reordered or not open in the storyview when visited later.... (it's a playground :-))
Here's a "permaviewlink": http://tinyurl.com/polfks9 (hope it is not broken this time...)

Cheers Måns Mårtensson 

Måns

unread,
May 21, 2015, 12:01:08 PM5/21/15
to tiddl...@googlegroups.com
Hi @Mat

>Mat:
@Måns - I hadn't realized you could paste in html like this - because that's what you've done, right? Copy-pasted the tiddler code right into your post, right?

It's almost a "Life Hack" to me:

I use this feature frequently to copy paste tables and formatted text from TW's into Word documents... arrange it for printing and save it to a pdf file.

It's a very quick way to get a lot of (pretty) links into a pdf document.

Cheers Måns Mårtensson
  

Matthew Petty

unread,
Jun 7, 2015, 2:25:14 AM6/7/15
to tiddl...@googlegroups.com
Thanks everyone, I managed to figure it out with your help.
Matthew

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/UL3hJtDY4XA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d4bce752-46f7-47f0-8789-4d60b6b58610%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Jonathan Salles

unread,
Aug 7, 2015, 8:02:23 AM8/7/15
to TiddlyWiki
I have made a couple of new tiddler "buttons", but hadn't thought to look at the core functions for creating new tiddlers.  I have some questions on this.

[[$(CurrentTiddlerTag)$]] is in double brackets, why?

Interesting idea to use the fields as the variable values, instead of shadow tiddlers like the core New Journal.  It makes it easier to see what the values actually are.

I understand most of the page, but I am still trying to understand why the list widget is used to display the buttons??  I would like to use the buttons from Font Awsome but they don't seem to be able to be used the same way.

It looks like there is a missing </set>, there are three of those but four <set name =>

Birthe C

unread,
Aug 7, 2015, 8:19:24 AM8/7/15
to TiddlyWiki
Hi Jonathan Salles,

You want your new tiddler to be tagged with the title of your tiddler. That title could have several words in it. You would not want a tag created for every word in the title.


Birthe
Reply all
Reply to author
Forward
0 new messages