I recommend looking at the source code for that method, as well as how it 
is used other places in the core. Either use grep on the command line, or 
the github search is actually pretty 
good: https://github.com/Jermolene/TiddlyWiki5/search?q=makeTranscludeWidget

 If you get stuck and still can't figure it out, please post the code for 
your widget.


On Monday, May 10, 2021 at 10:27:17 PM UTC+2 [email protected] wrote:

> Thanks,
>
> what does $tw.wiki.makeTranscludeWidget("fig"); actually return?  what 
> should i be setting the contents of my DOM node to with the object returned 
> from this?
>
> Thanks,
> James
>
> On Monday, 10 May 2021 at 13:56:31 UTC+1 [email protected] wrote:
>
>> Make a parse tree including a transclude widget or look at the 
>> wiki.makeTranscludeWidget method.
>>
>>
>> On Monday, May 10, 2021 at 2:32:03 PM UTC+2 [email protected] wrote:
>>
>>> in a tiddler {{fig}} works transcluded into another widget, so i guess 
>>> i'm asking : what it the widget way of performing/rendering a transclusion?
>>>
>>> On Sunday, 9 May 2021 at 19:24:54 UTC+1 James Anderson wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm trying to render a tiddler within another tiddler via a widget. I 
>>>> have attached a basic example in which i have a widget "twsr" which will 
>>>> schedule tiddlers, that match the tags in the parent tiddler, to be shown 
>>>> in the parent for the user to grade (basically a cersion of 
>>>> https://en.wikipedia.org/wiki/SuperMemo in TW)
>>>>
>>>> In this case i have tiddler "study fruits" which is tagged "fruit" and 
>>>> "veg" it should pick up any other tiddlers tagged with these and show them 
>>>> in "study fruits" one by one for grading. In this example the first one it 
>>>> will show is the "figs" tiddler.
>>>>
>>>> I'm calling "var cnt = $tw.wiki.renderTiddler("text/html", tiddler);" 
>>>> in the twsr widget to render the tiddler.
>>>>
>>>> "fig" uses "Fruit Template" tiddler which is a simple tiddler 
>>>> containing:
>>>>
>>>> <$view field="title"/>
>>>>
>>>> If i view fig individually i see what i expect. However rendering "fig" 
>>>> via $tw.wiki.renderTiddler("text/html", tiddler); in "Study Fruits" is not 
>>>> what i expect (basically the title via the view field is missing) What is 
>>>> the correct way to do this?
>>>>
>>>> Thanks
>>>> James
>>>>
>>>>
>>>>
>>>>
>>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2102b21b-449b-4c19-b37a-0ae2b1bd9336n%40googlegroups.com.

Reply via email to