Hi Felix I can only reply briefly now, but I think the transclude widget is pretty close to what you're after. You could either take the transclude widget as a starting point and create a custom variant, or you may be able to generate the transclude widget as the output of your widget (the edit-binary widget provides an example of this: https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/edit-binary.js ).
Best wishes Jeremy. On Mon, Nov 17, 2014 at 11:33 PM, Felix Küppers <[email protected]> wrote: > Hi, > > Say I have a tiddler T1 with a widget A that uses the transcluded content > of a tiddler T2 as its body. > > T1 looks like > > <$A>{T2}</$A> > > T2 looks e.g. like this > > blabla > <$list filter="[tag[hi]]"></$list> > <$button message="somemessage" param="hello">clickbutton</$button> > bla > > Widget A is now the parent of the widgets in its body and I can e.g. > listen to messages from the button or decide, when to refresh the widgets. > > My question: What is the correct way to render the content of T2 > programmatically in the plugin-code of widget A? > I looked at wiki.renderTiddler() but I do not know how and at what point > to call this method or if it is the correct way to do it. > > In the end, I want to have the same child widgets and content inside <$A> > as above however the tiddler T1 should look like this > > <$A /> > > The body should be {T2}. > > Could somebody please provide a minimal example and at what point to call > the functions needed? > > Regards Felix > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" 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/tiddlywikidev. > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev. For more options, visit https://groups.google.com/d/optout.
