Thanks for your quick reply, unfortunately I couldn't make it work or I 
didn't understand you. myMacro in the code you supplied only displays the 
concatenated transclusions {{Value1}} {{Value2}}, how can I use that as the 
argument of another macro? Also I get an undesired result if the tiddler to 
transclude has spaces in the name (title). I think the problem is that 
transclusions don't occur inside quotes before the call to the macro, is it 
the way it's supposed to work?

El domingo, 7 de junio de 2015, 16:07:19 (UTC-3), Mark S. escribió:
>
> What I've done, and it might not be the best approach, when I've needed to 
> concatenate two transclusions (which is what you're doing) is to call a 
> macro within a macro.
>
> *\define myMacro(cat1:"" cat2:"")*
> *<$macrocall $name="helper" scat1=$cat1$ scat2=$cat2$ />*
> *\end*
> *\define helper(scat1:"" scat2:"")*
> *$scat1$$scat2$*
> *\end*
>
> *My output is: <<myMacro {{Value1}} {{Value2}}>>*
>
> Mark
>
>
>
> On Sunday, June 7, 2015 at 10:53:40 AM UTC-7, Ezequiel Malamud wrote:
>>
>> Hi all, I'm new using TiddlyWiki and I'm having some trouble to get a 
>> macro working using a transclusion output as parameter. None of the 
>> following works:
>>
>>
>> *<<myMacro 
>> myParam="{{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}">>*
>>
>> *<<myMacro myParam={{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}>>*
>>
>> *<<myMacro "{{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}">>*
>>
>> *<<myMacro """{{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}""">>*
>>
>> *<$macrocall $name=myMacro 
>> myParam="{{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}"/>*
>>
>>
>> I'm expecting *myMacro* (Javascript) to get the concatenation of the 
>> fields *some-field* of tiddlers *myTiddlerA* and *myTiddlerB* as the 
>> parameter but so far I just get the string 
>> *"{{myTiddlerA!!some-field}}{{myTiddlerB!!some-field}}"* as the 
>> argument. Any help would be much appreciated.
>>
>>
>> This does work as expected:
>>
>>
>> *<$macrocall $name=myMacro myParam={{myTiddlerA!!some-field}}/>*
>>
>>
>> but this doesn't:
>>
>>
>> *<$macrocall $name=myMacro myParam="{{myTiddlerA!!some-field}}"/>*
>>
>>

-- 
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3f039d83-acf4-4d52-bdc6-592a96629586%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to