I was just about to ask the "title with spaces" question - thank you 
Stephan!  
I despair at ever learning how to put brackets, dollar signs and quotation 
marks in the right place, so in case it's helpful to someone else, after 
putting together Stephan's newtiddler solution, Dave's idea of adding it to 
the ViewToolbar, 
and Ton's helpful instructions for adding toolbar "buttons", I came up with 
this process for adding "New here":

Step one, get $:/plugins/skeeve/newtiddler from: 
http://tiddlystuff.tiddlyspot.com/

Step two, save and reload

Step three, create a tiddler:
Tiddler: SourceTemplateSkeleton
Tag: $(tags)$
(Note that once the tiddler is saved the tag appears to be blank and 
although it will show up as a tiny bar at the top of the Tags list, you 
won't be able to tell what it is and it can't be added or removed like 
other tags)

Step four, create another tiddler:
Tiddler: $:/_Newhere
Tag: $:/tags/ViewToolbar

\define get_title(l)
$l$$(title)$]]
\end
<$set name="title" value={{!!title}}><$set name="tags" value=<<get_title 
"[[">>><$newtiddler skeleton="SourceTemplateSkeleton" title="your title 
here" class="btn-invisible">
<span title="Create a tiddler tagged with this tiddler's 
title">@@font-size:8pt;New here@@</span></$newtiddler></$set></$set>

Optional Step five to use an image instead of text in the toolbar:
Replace @@font-size:8pt;New here@@ with an image tiddler, e.g. 
{{myIcon.svg}}

Optional Step six to change the order of things on the toolbar:
By default, "New here" will appear to the right of the other icons in the 
toolbar.  If you want it somewhere else, open the tiddler  
$:/tags/ViewToolbar and insert $:/_Newhere into the list in the order you 
prefer.

Optional Step seven, if you always want your newly created tiddler to have 
specific content, additional tags, and/or fields:
add text, tags or fields to SourceTemplateSkeleton

cmari

On Friday, March 14, 2014 12:11:24 AM UTC-7, Stephan Hradek wrote:
>
> One addition: As you want to use titles as tags, and titles may contain 
> spaces, the button needs to be a bit more complicated.
>
> \define get_title(l)
> $l$$(title)$]]
> \end
> <$set name="title" value={{!!title}}><$set name="tags" value=<<get_title 
> "[[">>><$newtiddler skeleton="SourceTemplate" title="your title 
> here">NewHere</$newtiddler></$set></$set>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to