Neat use-case! I will have to poke at this. My JsonMangler plugin is also 
intended for use in a tabletop gaming wiki, but I have not played around 
with the other style Data Tiddler.

But what you are most likely running into is that *{{this}}* is a shortcut 
for a pair of nested widgets:
<$tiddler tiddler="this" ><$transclude tiddler="this" /></$tiddler>

Which sets the <<currentTiddler>> variable to "this", and _then_ 
transcludes the contents of "this" into that context.

Not sure on just scanning why this would break your translcusion, but try:

<$tiddler tiddler="Available List"><$transclude tiddler="Available List" 
index="Hamlet"/></$tiddler>

See if there is any different behavior.

Best,
Joshua Fontany


On Friday, March 1, 2019 at 2:20:03 PM UTC-8, Shareen wrote:
>
> I am using data dictionaries to generate details for randomly generated 
> stuff (in this case towns) for tabletop gaming. 
> I found that using either alpha or numeric calls work for dictionaries 
> filled with a mix of alpha and numeric: {{Datadictionary 
> Name##AlphaOrNumericIndex}}, yay!
> However, the $transclude calls do not work for both alpha and numeric, 
> just numeric.
> Does anyone know if I am calling this correctly?
>
> TW5 version: *5.1.17*
>
>
> *Data Dictionary*
> Returns numerically indexed values depending on which alphanumeric it is 
> sent:
> type: application/x-tiddler-dictionary
>
> name: Available List
> Hamlet: <$wikify name=randy text=<<RollDice  num_dice: '1'  dice_size: '2' 
> dice_add:'0'>> ><$transclude $name="Available List" 
> index=<<randy>>/></$wikify>
> Village: <$wikify name=randy text=<<RollDice  num_dice: '1'  dice_size: 
> '3' dice_add:'0'>> ><$transclude $name="Available List" 
> index=<<randy>>/></$wikify>
> 1: CCC
> 2: DDD
> 3: EEE
>
> *Trials*
>
>
>    1. {{Available List##Hamlet}}: Returns CCC or DDD as expected
>    2. {{Available List##1}}: Returns CCC as expected
>    3. <$transclude tiddler="Available List" index=1/> : Returns CCC as 
>    expected
>    4. <$transclude tiddler="Available List" index="Hamlet"/>: Nothing 
>    returns, expect one of 4 or 5 to act like #1
>    5. <$transclude tiddler="Available List" index=Hamlet/>: Nothing 
>    returns
>    6. <$transclude tiddler="Available List" index=$(A)$/> & <$transclude 
>    tiddler="Available List" index=$A$/>: Nothing return, did not expect them 
>    to.
>
>
> Longer explanation on why I am using transclude:
>
> Each data dictionary has 1 to n  values, often a hundred or more. 
> In a "generator" tiddler I define the size of a town, and it is used 
> repeatedly in the tiddler to grab details. 
> Often there is a great deal of overlap, and instead of making a ton of 
> lists, one of each list for every flavor of town size, I used shared lists 
> and roll on them appropriately.
>
> \define TownSize() Hamlet
>
>
> Detail 1: <$transclude tiddler="X Available" index=<<TownSize>> />
> Detail 2: <$transclude tiddler="Y Available" index=<<TownSize>> />
> Detail 3: <$transclude tiddler="Available List" index=<<TownSize>> />
>
>
>

-- 
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/cf66e801-ac39-423c-bf51-eb31440d25c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to