I am creating a button that will create a tiddler and a bunch of tiddlers 
tagged with the name of that tiddler and whose name are the name of the 
tiddler with various words appended. 

for example, "Tiddler one" and "Tiddler one - Category one" , with tag: 
"Tiddler one"

The problem I have is that in this line
<$action-createtiddler $basetitle={{$:/state/new-button-caption}} 
tags="Workshop createdByButton" 
text={{$:/plugins/reidgould/dpbd/templates/view/Board}} focus=yes /

I create the tiddler, but if a tiddler with that name, Say "Tiddler One" 
exists, the actual name of the tiddler with not be 'Tiddler One' but 
'Tiddler One 1" (or 2 or 3, if prior ones exist...). This is alright as far 
as it stands, but now the tags, which are based on  
"{{$:/state/new-button-caption}}" 
will not have the additional number, will all be to the original tiddler, 
not the newly created tiddler. 

I also had ot use the strange tagme tagx scheme in order to get tiddler 
names with spaces into the tag, otherwise the name became several tags (for 
example, if I used "tags={{$:/state/new-button-caption}}" directly). There 
may be a better way to do this???

Is there any way to fix this? I think I have to update
<$set name=tagx value={{$:/state/new-button-caption}} >
somehow...but how to identify the correct value, i.e. the exact name of the 
tiddler I just created?

P.S. I cribbed most of the code from other places, and it is well likely 
that there is a better approach for this or other aspects of it...Thanks in 
advance.


\define songs() {{$:/state/new-button-caption}} - Songs
\define games() {{$:/state/new-button-caption}} - Games
\define art() {{$:/state/new-button-caption}} - Art
\define intro() {{$:/state/new-button-caption}} - Intro
\define books() {{$:/state/new-button-caption}} - Books
\define tagme() [[$(tagx)$]]

<$set name=tagx value={{$:/state/new-button-caption}} >

 Title: <$edit-text tiddler="$:/state/new-button-caption" tag="input" 
default=""/>
<br>
Button below will create a Workshop with the following names and tags:<br>

* {{$:/state/new-button-caption}} tags: Workshop, createdByButton 
* <<songs>> TAGS: "<<tagx>>"
* <<games>> TAGS:  "<<tagx>>"
* <<art>> TAGS:  "<<tagx>>"
* <<intro>> TAGS:  "<<tagx>>"
* <<books>> TAGS:  "<<tagx>>"


<$wikify name="songs" text=<<songs>> >
<$wikify name="games" text=<<songs>> >
<$wikify name="art" text=<<songs>> >
<$wikify name="intro" text=<<songs>> >
<$wikify name="books" text=<<songs>> >
<$button>

<$action-createtiddler $basetitle={{$:/state/new-button-caption}} 
tags="Workshop createdByButton" 
text={{$:/plugins/reidgould/dpbd/templates/view/Board}} focus=yes />

<$set name=tagx value={{$:/state/new-button-caption}} >
<$action-createtiddler $basetitle=<<songs>> tags=<<tagme>> text="Homemade 
Button" focus=yes />
<$action-createtiddler $basetitle=<<games>> tags=<<tagme>> text="Homemade 
Button" focus=yes />
<$action-createtiddler $basetitle=<<art>> tags=<<tagme>> text="Homemade 
Button" focus=yes />
<$action-createtiddler $basetitle=<<intro>> tags=<<tagme>> text="Homemade 
Button" focus=yes />
<$action-createtiddler $basetitle=<<books>> tags=<<tagme>> text="Homemade 
Button" focus=yes />
</$set>

New Tiddler
</$button>
</$wikify>
</$wikify>
</$wikify>
</$wikify>
</$wikify>



-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/989fc0e6-2f20-4798-9374-8185cfb3d36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to