newTiddler macro and template

195 views
Skip to first unread message

tiddlygrp

unread,
Nov 3, 2010, 5:50:54 AM11/3/10
to TiddlyWiki, tidd...@gmail.com
Hi,

I have some problems related to the newTiddler macro. If I put the
following in an empty tiddler:

<<newTiddler
label:"test 1"
title:"test 1"
text:"Hello world."
template: ViewTemplate
>>
<<newTiddler
template ViewTemplate
label:"test 2"
title:"test 2"
text:"Hello world."
>>
<<newTiddler
template: ViewTemplate
label:"test 3"
title:"test 3"
text:"Hello world."
>>

I get different results (test 2 has no : between template -
ViewTemplate). Test 2 gets a tag "ViewTemplate", and test 1 and test
2 actually don't create tiddlers.

In any case my main problem is that it seems I can't create a
prefilled saved tiddler. However I believe in http://trac.tiddlywiki.org/ticket/135
"Extend the newTiddler macro to open the newly create tiddler in "view
mode" (rather than in Edit mode)" the problem should have been
solved. Is there something I do wrong, or should the ticket be
reopened?

yours,

Vlak



Anthony Muscio

unread,
Nov 4, 2010, 9:38:23 PM11/4/10
to tiddl...@googlegroups.com
Here is some working examples which do not present the same errors but demonstrates how "new tiddler directly to view template" does not pre-fill. You have to use the Edit Template. This acts as a confirmation step when you have to save. I have the menu option done/close so this is fairly quick.

In addition to opening prefilled in the view template it would be nice if tiddlers could be created silently (not even opened in view template) - New tiddlers could thus be used as switches.

Create with Opening View template (".newProjectTaskContent" not included in tiddler)
<<newTiddler
   label:"Any Work Project Comms"
   title:"Project Comms"
   text:{{store.getTiddlerText(".newProjectTaskContent")}}
   tag:".projectTask"
   tag:"=comms"
   tag:"=place"
   tag:":work"
   template:.taskViewTemplate
>>

Create with Opening Edit template (".newProjectTaskContent" included in tiddler)
<<newTiddler
   label:"Any Work Project Comms"
   title:"Project Comms"
   text:{{store.getTiddlerText(".newProjectTaskContent")}}
   tag:".projectTask"
   tag:"=comms"
   tag:"=place"
   tag:":work"
   template:.taskEditNewTemplate
>>
Tony M

Anthony Muscio
LaSourceProjects.org Open Source Sustainability Projects
LaSource.com.au Sustainable Products and Business
SerendipityIdeas.com IT hints and Tips and Website hosting
Like personal Web 2.0 ? see www.tiddlywiki.com






--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.


TonG

unread,
Nov 5, 2010, 7:44:48 AM11/5/10
to TiddlyWiki
Hi Vlak,

May be [1] helps?

Cheers,

Ton

[1]
http://groups.google.com/group/tiddlywiki/browse_thread/thread/363c4ea46b913a4f/9ca4196c5dc1749c?lnk=gst&q=newtiddler+viewtemplate#9ca4196c5dc1749c
> LaSource.com.au <http://www.LaSource.com.au> Sustainable Products and
> Business
> SerendipityIdeas.com IT hints and Tips and Website hosting
> Like personal Web 2.0 ? seewww.tiddlywiki.com
>
> > tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>
> > .

TonG

unread,
Nov 5, 2010, 7:57:17 AM11/5/10
to TiddlyWiki
Hi Vlak,

Note the last sentence in [1]: "You can only prime the initial values
of fields that map to a text input box in the specified template".

Cheers,

Ton

[1] http://tiddlywiki.com/#NewTiddlerMacro

On Nov 5, 12:44 pm, TonG <ton.ger...@gmail.com> wrote:
> Hi Vlak,
>
> May be [1] helps?
>
> Cheers,
>
> Ton
>
> [1]http://groups.google.com/group/tiddlywiki/browse_thread/thread/363c4e...
Reply all
Reply to author
Forward
0 new messages