Thanks for the prompt reply. I changed <<currentTiddler>>
 to $(currentTiddler)$ in the macro body, as

\define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$

still, transclude widget doesn't transclude:

<$list filter="whateveFilterHere">
    <$transclude tiddler=<<getMeTiddlerName "_EN">> /> <br/>   <!-- DOESN'T
WORK -->
</$list>

If I try to print to screen the macro output just for debug purposes, it
correctly shows the current tiddler's name added with the suffix, say

    <<getMeTiddlerName "_EN">>
outputs
    SOMETIDDLERSNAME_EN
to screen.

Clueless...

CG


On Sun, Aug 8, 2021 at 7:34 PM 'Mark S.' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> When you use <<currentTiddler>>, it's actually creating a *link* to that
> tiddler. What you want in your macro is the plain substitutable (new word!)
> text. So try:
>
> \define getMeTiddlerName(a_suffix) $(currentTiddler)$$a_suffix$
>
>
> On Sunday, August 8, 2021 at 9:08:29 AM UTC-7 CarloGgi wrote:
>
>>
>> Hallo,
>> quite new to TW and I love it, though it is dramatically underdocumented
>> and the whole docs are an almost unusable mess.
>>
>> To my biggest astonishment, when I try to dynamically build the name of a
>> tiddler from inisde a macro, that macro output cannot be used from within a
>> transclude widget.
>>
>> \define getMeTiddlerName(a_suffix) <<currentTiddler>>$a_suffix$
>>
>> <$list filter="whateveFilterHere">
>>     <$transclude tiddler=<<getMeTiddlerName "_EN">> /> <br/>
>> </$list>
>>
>> In the example above, I obtain the tiddler's name by adding suffix 'EN'
>> to current tiddler, which the macro DOES, but then its output
>> <<getMeTiddlerName "EN">> doesn't make transclude widget behave as expected.
>>
>> I also tried many combinations of single/double quotes, as for instance
>> in:
>>
>>     <$transclude tiddler="<<getMeTiddlerName '_EN'>>" /> <br/>
>>
>> but no result at all: the transclude widget DOESN'T transclude the
>> dynamically-built tiddler SOMETIDDLERNAME_EN
>>
>> Not even the simpler version with hard-coded suffix works:
>>
>> \define getMeTiddlerName() <<currentTiddler>>_EN
>>
>> <$list filter="whateveFilterHere">
>>     <$transclude tiddler=<<getMeTiddlerName>> /> <br/>
>> </$list>
>>
>> Nor does it using double quotes for 'tiddler' parameter inside transclude
>> widget:
>>
>> \define getMeTiddlerName() <<currentTiddler>>_EN
>>
>> <$list filter="whateveFilterHere">
>>     <$transclude tiddler="<<getMeTiddlerName>>" /> <br/>
>> </$list>
>>
>> Thanks for helping, soooo frustrated!
>>
>> CG
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/hbSf3WtfLvM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/68ec233c-e221-4803-9bba-225326fbbc16n%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/68ec233c-e221-4803-9bba-225326fbbc16n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAJsULbQ6w8xmZ7AfNY%2Bsz6kXi5ZTzqez4U30XmURCqoA%3DK5EQ%40mail.gmail.com.

Reply via email to