On Apr 11, 3:23 pm, Måns <[email protected]> wrote:
> Hi
>
> I'm trying to make a preformatted viewtemplate with prearranged fields
> for date, title, subtitle, recipient(name fetched from field in
> another tiddler), bodytext divided into columns with linebreaks etc...
> (I even consider to let it show pictures fetched from urls specified
> as fieldvalue in other tiddlers - automatically chosen when specifying
> recipient and dispatcher)
>
> Has anyone attempted to do the same - or have an example/prototype,
> that I could customize for my own use??
>
> YS Måns Mårtensson
You can do this with parameters to the newTiddler macro. As an
example, here is my project list tiddler.
Current Projects:<<tiddlerList tags:"project">><<newTiddler label:"New
Project" title:"New Project" tag:"project" text:"''Project Name:''
''Client:''
''Date:'' ">>
This shows a list of my current projects, and a button to create a new
project. The button creates the new tiddler with the starter text
already in it. I've simply injected the starting text into the "text"
parameter of newTiddler. For more complicated examples, you sometimes
have to get creative with the escaping. For example, here is my task
list.
Incomplete Tasks:<<tiddlerList tags:"task,-complete">><<newTiddler
label:"New Task"
title:"New Task"
accessKey:T
tag:"task"
text:{{"''Task:'' \n"
+ "''Due Date:'' \n"
+ "''Complete:'' <<toggleTag complete . '-'>\>\n"
+ "''Notes:'' "}}>>
Here, the principal is the same, but since I want the new task tiddler
to have a toggleTagPlugin button in it, I have to go pretty far out of
my way to escape the contents of the newTiddler macro's "text"
property. It works, though.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---