> I'm using tiddlywiki to document information of our network. The thing I was
> thinking to do is create a template tidder called machineTemplate and put in
> there something like the following lines
> |eth0|eth1|ilo|
> | | | |
> The second line is more or less empty and needs to be filled with new
> info...
The term "template" in TiddlyWiki applies to a specific set of special-
purpose tiddlers that contain TiddlyWiki-enhanced HTML syntax.
Templates are used to define the layout of the overall page
([[PageTemplate]]), as well as the layout of each tiddler when
displayed ([[ViewTemplate]]) or edited ([[EditTemplate]]).
However, if I understand your objective correctly, I think that all
you really need is a way to specify the default contents for newly
created 'machine' tiddlers. Here's one common method that is very
easy to use:
First, start by creating a tiddler named [[DefaultMachine]],
containing just the desired default content, e.g.:
|eth0|eth1|ilo|
| | | |
Then, using a 'computed parameter' in the <<newTiddler>> macro, you
can embed a command link (anywhere you like, e.g., [[MainMenu]] or
[[SideBarOptions]]) to retrieve the text from [[DefaultMachine]], like
this:
<<newTiddler
label:'new machine'
prompt:'add a new machine tiddler'
title:NewMachine
text:{{store.getTiddlerText('DefaultMachine','')}}
tag:machine>>
When you click on the resulting 'new machine' command link, a fresh
tiddler editor will be opened for a tiddler named [[NewMachine]], with
content automatically inserted from [[DefaultMachine]], ready for you
to enter more info.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---