Sorry - of course <<tiddler TiddlerName with: {{tiddler.title}}>>
worked exactly as you said - (I just put to many parameters into
it...I though of ShowPopup, when designing the button...)
Thanks a lot!
My 1.st problem: Select tiddler (value=tiddler with list) -> run it
through script - still remains unsolved...YS Måns Mårtensson On Sep 15, 12:38 am, Måns <[email protected]> wrote: > Hi Eric > I'm sorry to bother you with the same question again... > My question is showing my problem - and is *not* to be interpreted as > a repetetive request for a new plugin or coredevellopment. > > The fact is that after I've been thinking it all through several > times, I'm getting back to the same point again and again - and I > forget that I've described my problem in the same way earlier - > sorry.. > > I will try to explain my problem in more detail - with real examples > - > I obviously need some kind of workaround for <<tiddler Tiddlername > with: %0 fieldn...@here>> because: > (2 scenarios:) > 1) I would like to be able to choose a tiddler with selectmacro (from > a list and/or "other") which then is run through a script. The script > will tag each listitem=tiddlertitles in the chosen tiddler > (title=fieldvalue) with a predefined tag ("ContactSheet") like this: > <script label="Create ContactSheet"> > var titles=store.getTiddlerText > ("TheFieldvalueChoosenBySelectMacro").readBracketedList(); > for (var i=0; i<titles.length; i++) store.setTiddlerTag(titles > [i],true,'ContactSheet'); > </script> > > The tagged tiddlers fields will appear wikified in the > ContactSheetTiddler via a splitted fET like this: > {{invisibletable{ > |<<tiddler HLB1>>|<<tiddler HLB2>>|<<tiddler HLB3>>|<<etc|etc|}}} > > where each tiddler has one part of the fET like this: > HLB1: > <<forEachTiddler where 'tiddler.tags.contains > (context.viewerTiddler.title)' > sortBy 'tiddler.title' > write > '(index<5)? " "+(index+1)+" [img(6em+,Auto)["+store.getValue > (tiddler,"title")+"|"+store.getValue(tiddler,"image")+"] > ["+tiddler.title+"]] \n [["+tiddler.title+"]] \n [["+tiddler.fields > ["class"] +"]] kl <<tag "+tiddler.fields["room"]+" \>\> <<tag > "+tiddler.fields["tutor"]+" \>\> \n \n" : ""' > begin '"" > +""' > end '" \n"' none '"none \n"'>> > HLB2: > <<forEachTiddler where 'tiddler.tags.contains > (context.viewerTiddler.title)' > sortBy 'tiddler.title' > write > '(index>4) && (index<10)? " "+(index+1)+" [img(6em+,Auto) > ["+store.getValue(tiddler,"title")+"|"+store.getValue(tiddler,"image") > +"]["+tiddler.title+"]] \n [["+tiddler.title+"]] \n > [["+tiddler.fields["class"] +"]] kl <<tag "+tiddler.fields["room"]+" \> > \> <<tag "+tiddler.fields["tutor"]+" \>\> \n \n" : ""' > begin '"" > +""' > end '" \n"' none '"none \n"'>> > HLB3: > <<forEachTiddler where 'tiddler.tags.contains > (context.viewerTiddler.title)' > sortBy 'tiddler.title' > write > '(index>9) && (index<15)? " "+(index+1)+" [img(6em+,Auto) > ["+store.getValue(tiddler,"title")+"|"+store.getValue(tiddler,"image") > +"]["+tiddler.title+"]] \n [["+tiddler.title+"]] \n > [["+tiddler.fields["class"] +"]] kl <<tag "+tiddler.fields["room"]+" \> > \> <<tag "+tiddler.fields["tutor"]+" \>\> \n \n" : ""' > begin '"" > +""' > end '" \n"' none '"none \n"'>> > > etc etc > > Secondly I need some kind of workaround for <<tiddler TiddlerName > with: {{tiddler.title}}>> because I would like to be able to put a > "script-button" in a tiddler which contains a list that will tag all > listed tiddlers with "ContactSheet" > I can only come up with this (and I will need a workaround, as this > obviously doesn't work): > > ScriptTiddler > <script label="Create ContactSheet"> > var titles=store.getTiddlerText("$1").readBracketedList(); > for (var i=0; i<titles.length; i++) store.setTiddlerTag(titles > [i],true,'ContactSheet'); > </script> > > *and* > > ButtonTiddler: > <<tiddler ScriptTiddler with: {{tiddler.title}} [[2contactsheet]] > [[Make contactsheet from listed tiddlers]] button>> > > I hope you see why I'm having problems and why I'm returning with the > same question > If you can recommend another way to obtain a similar result, I would > be happy to know.. > > YS Måns Mårtensson > > On Sep 14, 10:21 pm, Eric Shulman <[email protected]> wrote: > > > > How do I make this work?= <<tiddler Tiddlername with: %0 > > > fieldn...@here>>? > > > Is it possible to make= <<tiddler Tiddlername with: %0 ti...@here>>? > > > Mans, > > > As I have explained several times, the "fieldn...@tiddlername" syntax, > > and the use of %0 through %9 as 'substitution markers' within > > parameters is NOT part of the TW core. It is something I developed > > for use in some plugins (such as ListboxPlugin, EditFieldPlugin, and > > WikifyPlugin). While this syntax might *seem* to be general-purpose, > > it is not, and cannot be used in any macros except those defined by > > the plugins that specifically support it. > > > As to your specific question: it seems that perhaps you are wanting to > > pass the title of the current tiddler to the transcluded one? If so, > > then you should use a *computed parameter*, like this: > > > <<tiddler TiddlerName with: {{tiddler.title}}>> > > > When the macro is processed, the javascript reference inside the > > {{...}} is evaluated and it's resulting value is used as the value of > > that parameter. > > > enjoy, > > -e --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

