Transclusion and tab

In my wiki I use this template to present certains tiddlers :

!!{{!!description}}


|chuffmed|k
| <$image width="300" source={{!!PIECE_Image}}></$image> |<<table-dynamic filter:"[tag[Piece]search:PIECE_Parent{!!title}]" fields:"title description PIECE_Matiere" class:"lignes" editButton:"no">>|

This works fine. The table-dynamic macro is from @Mohammad 's Shiraz plugin.

Now I need to show those tiddler in tabs. I managed to change some transclusion definitions,

!!!<$transclude tiddler=<<currentTab>> field="description" />

|chuffmed|k
| <$image width="300" source=<$transclude tiddler=<<currentTab>> field="PIECE_Image" /></$image> |<<table-dynamic filter:"[tag[Piece]search:PIECE_Parent{!!title}]" fields:"title description PIECE_Matiere" class:"lignes" editButton:"no">>|

but, for the image inclusion, this doesn’t work and I don’t know how to express the table dynamic filter [tag[Piece]search:PIECE_Parent{!!title}] to make this work to use currentTab title field.

Hi @Thomas_Chuffart

Nesting widgets is not a valid syntax. You can try using a filtered transclusion like this:

!!!<$transclude tiddler=<<currentTab>> field="description" />

|chuffmed|k
| <$image width="300" source={{{ [<currentTab>get[PIECE_Image]] }}} /></$image> |<<table-dynamic filter:"[tag[Piece]search:PIECE_Parent{!!title}]" fields:"title description PIECE_Matiere" class:"lignes" editButton:"no">>|

Fred

Thank you Fred, this works for the image transclusion.

But I tried to use the same filtered trasclusion in the filter definition of the dynamic table like this:

[tag[Piece]search:{{{ [<currentTab>get[title]] }}}]

but I have an error missing [ in filter expression but it seems to have the right amount of opening and closing brackets…

Nesting is also not allowed inside filters…
Try this:
[tag[Piece]search:PIECE_Parent<currentTab>]
It should work, as <<currentTab>> is already a tiddler title.

Fred

1 Like