Hi!
Let's see if I understand correctly. You want to tag every new
category tiddler with its own title. If so, you could add the
following button script to your MainMenu:
<script label="New category" title="Create a new category">
var alwaysTag="category";
var p1=prompt("Enter category name","");
if(!p1)return;
if(store.tiddlerExists(p1)) {
  if(!
confirm(config.messages.overwriteWarning.format([p1.toString()])))
  return null;}
var tags=(alwaysTag+" "+p1);
var title=(p1);
store.saveTiddler(
  title,
  title,
  "Enter your text or put a template here",
  config.options.txtUserName,
  new Date(),
  tags);
autoSaveChanges(null,[tiddler]);
story.displayTiddler(null,title);
</script>

The created tiddler is displayed in view mode, but I'm sure that by
tweaking the last line, you could open it in edit mode.

w

On Oct 3, 7:52 pm, Serena <[email protected]> wrote:
> I'm trying to use ToggleTag & ForEachTiddler in the EditTemplate, but
> I'm having trouble getting it to tag the containing tiddler.  Here's
> what I have:
>
> In a tiddler named ToggleTagTemplate:
>
> <<forEachTiddler where 'tiddler.tags.contains("category")' write
> '"<<toggleTag [["+tiddler.title+"]]$))"'>>
>
> In the EditTemplate:
>
> <div macro='tiddler ToggleTagTemplate'></div>
>
> But when I try to tag a new tiddler, it tags ToggleTagTemplate
> instead.  Any tips on how to get this work?  Thanks in advance.

-- 
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.

Reply via email to