Why does the tag {{||$:/core/ui/TagTemplate}} work for TW5 Magick, but not for me?

85 views
Skip to first unread message

JWHoneycutt

unread,
Jan 27, 2018, 7:36:20 AM1/27/18
to TiddlyWiki

I am trying to import the "New Phone Call" and "New Staff Meeting" button functionality from (Skeeve?) / TW5 Magick.

I found and imported his/her $:/let widget and $:/newtiddler widget, as well as the standard tiddler 'base_skeleton'.

Importing TW5 Magick's tiddler `base_skeleton` (from http://tw5magick.tiddlyspot.com/) with the tag of `{{||$:/core/ui/TagTemplate}}` causes a consistent Internal JavaScript Error when I subsequently try to modify ANY tiddlers tags.

It works beautifully on http://tw5magick.tiddlyspot.com/

I'm not sure what the line 'skeleton="base_skeleton"' accomplishes.  I am pretty confident the tag above is my culprit.

Any thoughts?

JWHoneycutt

JWHoneycutt

unread,
Jan 27, 2018, 7:43:53 AM1/27/18
to TiddlyWiki

If I delete the 'base_skeleton' tiddler and any reference to it,

The New Phone Call and New Staff Meeting buttons work, but lose the crucial functionality of placing me directly into them in edit mode.

BurningTreeC

unread,
Jan 27, 2018, 7:54:30 AM1/27/18
to TiddlyWiki
hello @JWHoneycutt,

If I remember right, this needs a skeleton tiddler to work

the tag you are describing I think is only showed like this because it holds "$variable$" as a placeholder

I guess the button creates a variable that should be inserted as a tag or similar

that variable would be there like {{$variablename$||$:/core/ui/TagTemplate}}

on the site you linked to you can find a step by step instruction


good luck!
BurningTreeC

JWHoneycutt

unread,
Jan 27, 2018, 8:15:55 AM1/27/18
to TiddlyWiki
@BurningTreeC

Thank you for your thoughts. 

I am reading through '$:/plugins/skeeve/newtiddler.js' to find the answer...  

I assume I'm not supposed to be CREATING a new tag and inserting my own variableName like this '{{variableName||$:/core/ui/TagTemplate}}'

It would be curious (to me) for tags to contain variables.

As far as the "jump straight into edit mode for new tiddler", I think it has to do with:

          if(this.newtiddlerEdit === "yes") {  this.dispatchEvent({type: "tw-edit-tiddler", tiddlerTitle: title});  }
So I created a tiddler titled "this.newtiddlerEdit" with text of "yes" - but it does not work (yet)

All thoughts are appreciated.

I know these buttons were created and shared - but I can't figure all the hooks to make them work.  

BurningTreeC

unread,
Jan 27, 2018, 8:34:37 AM1/27/18
to TiddlyWiki
I assume I'm not supposed to be CREATING a new tag and inserting my own variableName like this '{{variableName||$:/core/ui/TagTemplate}}'

that's how this work as I remember right. look at the page, there's the "base_skeleton" tiddler (search in the sidebar search for base_skeleton)
that tiddler has an empty tag. if you create a tiddler with a tag like $variable$ - you'll get such an empty tag. I think that's what the creator did there 

It would be curious (to me) for tags to contain variables.

the variables get defined before, the skeleton tiddler gets used to put the variables to the places where they should be after the new tiddler is created 

As far as the "jump straight into edit mode for new tiddler", I think it has to do with:

          if(this.newtiddlerEdit === "yes") {  this.dispatchEvent({type: "tw-edit-tiddler", tiddlerTitle: title});  }
So I created a tiddler titled "this.newtiddlerEdit" with text of "yes" - but it does not work (yet)

this is the wrong approach, you can let this go 

All thoughts are appreciated.

I know these buttons were created and shared - but I can't figure all the hooks to make them work.


you could try this:



<$vars tag="call">
<$newtiddler title=<<now "YYYY-0MM-0DD 0hh:0mm:0ss">> skeleton="base_skeleton" edit="yes">New Phone Call</$newtiddler>
</$vars> 


put this in a tiddler and create another tiddler called "base_skeleton"

in the "base_skeleton" tiddler create a tag $tag$    and save it

then try the button


BurningTreeC

PMario

unread,
Jan 27, 2018, 8:40:12 AM1/27/18
to TiddlyWiki
On Saturday, January 27, 2018 at 1:36:20 PM UTC+1, JWHoneycutt wrote:
I found and imported his/her $:/let widget and $:/newtiddler widget, as well as the standard tiddler 'base_skeleton'.

Hi,
Skeeve's stuff is "magic" but super old, super hacky and not maintained atm. ... Many of the ideas, are implemented in a slightly different way in the core already.

So chances are high, that you blow up your stuff.

IMO it would make more sense if you describe your usecase and we implement the stuff from scratch.

have fun!
mario

JWHoneycutt

unread,
Jan 27, 2018, 8:47:52 AM1/27/18
to TiddlyWiki
@BurningTreeC

The tag $tag$ placed into base_skeleton did take care of the JavaScript Error when editing tags - thank you.

These buttons now work - that is to say they quietly create a tiddler that I must go find to edit (using the recent tab may be easiest way to find, although inelegant)

Now I am searching for the extra convenience of being jumped straight from the New Phone Call/Meeting button to the edit the new tiddler feature.

Thank you BurningTreeC!

BurningTreeC

unread,
Jan 27, 2018, 9:04:39 AM1/27/18
to TiddlyWiki
as @PMario says, this is very old and you don't need skeeve's solution to accomplish this

this alone in a tiddler should already do what you want:


\define phonecall-button-actions()
<$action-setfield $tiddler="$(description)$ $(dateformat)$" $field="tags" $value="$(tag)$"/><$action-navigate $to="$(description)$ $(dateformat)$"/>
\end

<$vars tag="PhoneCall" description="Phone call today" dateformat=<<now "YYYY-0MM-0DD 0hh:0mm:0ss">>>
<$button>
<<phonecall-button-actions>>new phone call
</$button>
</$vars>

Birthe C

unread,
Jan 27, 2018, 9:21:42 AM1/27/18
to TiddlyWiki
You will need $:/macros/skeeve/dateTime.js

Then for New Staff Meeting button write:

<$button tooltip="new staff meeting">
<$action-sendmessage $message="tm-new-tiddler" title=<
<dateTime "Staff Meeting on YYYY-0MM-0DD">> tags="minutes" text="" />New Staff Meeting</$button>

And

New Phone Call button

<$button tooltip="New PhoneCall button">
<$action-sendmessage $message="tm-new-tiddler" title=<
<dateTime "Phone Call YYYY-0MM-0DD 0hh:0mm:0ss">> tags="call" text="" />New PhoneCall</$button>

Birthe

JWHoneycutt

unread,
Jan 27, 2018, 11:22:16 AM1/27/18
to TiddlyWiki

@Birthe and @PMario,

Thank you so much!

I actually love being told - "you are going in a completely wrong direction..."  It feels like getting back in the fast lane of learning.

Birthe - your solutions work perfectly.  I really like how (when clicked multiple times in the same day) they don't overwrite and destroy a prior tiddler of the same date title, but instead pull it up so you can keep appending.

The minor modifications I made were:
[Meeting with date]

<$button tooltip="New Morning report meeting button">
<$action-sendmessage $message="tm-new-tiddler" title=<<dateTime "YYYY-0MM-0DD Morning report">> tags="Morning report" text="" />New Morning report meeting</$button>

and [Phone call with date and time]

<$button tooltip="New PhoneCall button">
<$action-sendmessage $message="tm-new-tiddler" title=<<dateTime "YYYY-0MM-0DD 0hh:0mm:0ss Phone call">> tags="Call" text="" />New Phone Call</$button>

@PMario
It all started with wanting a simple button, and not being able to find enough documentation to learn how to create it.  So I started searching for examples of button usage and stumbled upon New Phone Call and New Staff Meeting (which are personally useful).

My original use case is even easier (I think):

I have a Task list with check boxes - I like it.
I create a Journal entry for the day, and chose to transclude the task list {{Task}} as the first thing in the new journal entry.
The Task list is now fairly long, and overwhelms the journal entry, so I changed it to [[Task]], and I link to it rather than transclude it.
I wanted to learn enough to create a button to select/switch between these options without rewriting the journal entry

I would LOVE a repository of Button usage examples - simple examples so that I can teach myself from examples, and ultimately incorporate...

Again, thank you both - 

JWHoneycutt (ie. no longer barking up the wrong tree)

PMario

unread,
Jan 27, 2018, 4:58:35 PM1/27/18
to TiddlyWiki
On Saturday, January 27, 2018 at 5:22:16 PM UTC+1, JWHoneycutt wrote:

@PMario
It all started with wanting a simple button, and not being able to find enough documentation to learn how to create it.  So I started searching for examples of button
usage and stumbled upon New Phone Call and New Staff Meeting (which are personally useful).

I see: This may be a starting point for some button examples: https://tiddlywiki.com/#ActionWidgets ... Also open the links in the tiddler.

I also did create several videos some time ago, which is discussed here in the group: A script and todo manager workflow / UI experiment + video howto's
It discusses a lot of different UI elements in detail. ... Some button magic is discussed in videos 15, 16, 17 which in sum are about 17 minutes. If you like the stuff hit the like button and / or subscribe!

have fun!
mario
Reply all
Reply to author
Forward
0 new messages