Hi Eric
Thanks to your precise notes, I could get one of the two buttons to work. With two buttons or formatting it will crash...
But that is already much better than before.
But would it be possible to insert a Text stored in a TemplateTiddler at the end using somthing like {{store.getTiddlerText('StoryButtonsTemplateTiddler')}} ?

Thanks for your help!


Am 25.10.2013 00:07, schrieb Jan Johannpeter:
Hi Eric,
thanks for your fast response. This works, but I still need to buttons in the new tiddler. And, even worse - I'd like to format them. So I would like to have this behind the first macro.

After the story, I would like to insert this into every created tiddler:
{{blueButton{<<openStory {{tiddler.title}} "Einträge als Reihe öffnen" "Öffnet alle Einträge dieser Zusammenstellung">>}}}{{redButton{<<slideShow label:'Einträge im Diaschau Modus' toc:titles clock:0 clockFormat:'0hh:0mm'>>}}}

Unfortunately all my efforts crashed the macro...

That's why I was doing this detour using the templat tiddler.
Sorry this is so complicated, I would insert these butons manually but my collaegues and pupils shall be able to save theis own stories and then be able to reopen them as slideshows...

Is there a solution to add also this text?

Yours Jan



Am 24.10.2013 23:50, schrieb Eric Shulman:
On Thursday, October 24, 2013 2:04:02 PM UTC-7, Jan wrote:

    Here's the problem:
    Creating a macrobutton:
    <<newSavedTiddler
             label:"Save this Story"
             text:{{store.getTiddlerText('SaveStoryTemplateTiddler')}}
             tag:'MyTag1 [[Three Word Tag]]'
     >>
    ...and a SaveStoryTemplateTiddler
    <script>
    var out = "" ;
    story.forEachTiddler(function(t){
        var tid=store.getTiddler(t);
         if(tid&&!tid.isTagged("excludeStory"))
           out+="[["+t+"]]\n";})
    return out ;
    </script>
    <<openStory {{tiddler.title}} "Open this Story" "Display all the
    tiddlers listed above...">>

    Now problem is:
    The script should be rendered to save the current storyline as
    static
    links, not to display the one actually opened on a later moment.
    How do I accomplish this.
    Is there something like "clickyfy" for this cause...?


Using http://www.TiddlyTools.com/#ClickifyPlugin, you can write the script directly into the newTiddler macro, like this:

<<clickify newSavedTiddler
      label:'Save this Story'
      text:{{
         var out='';
         story.forEachTiddler(function(t){
            var tid=store.getTiddler(t);
if(tid&&!tid.isTagged('excludeStory'))
               out+='[['+t+']]\n';});
out+='<<openStory [['+tiddler.title+']] "Open this Story" "Display all the tiddlers listed above...">\>'
         out;
      }}
      tag:'MyTag1 [[Three Word Tag]]'
 >>

Notes:
* by using ClickifyPlugin, the evaluated "text:" parameter is recalculated when you click on the 'Save this Story' command label. * when macro syntax is embedded within evaluated parameter script code, e.g., use of "<<openStory ... >>" as a text string, you must insert a backslash (\) in between the closing angle brackets of the embedded macro -- i.e., ">>" becomes ">\>" -- so that the closing ">>" of the embedded macro does not erroneously appear to be the end of the entire macro being invoked, rather than just a simple bit of text within the scripted code. * the last line of the evaluated parameter retrieves the value of "out" without performing any other action. This allows the value to be used as the final value of the evaluated parameter as a whole.

Let me know how it goes...

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.


--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to