The solution is to encapsulate the macrocall in <$tiddler>:

<$tiddler tiddler=<<currentTab>>><$macrocall $name=linkdataset projectid =
{{!!project-id}} path={{!!path}} file={{!!file-name}}/></$tiddler>

Cheers,
Ulrik


2014-05-12 19:46 GMT+02:00 Ulrik Stervbo <ulrik.ster...@gmail.com>:

> It works really well, except...
>
> Some of the tiddlers being transcluded have a macro to generate the path
> to an external file:
>
> \define linkdataset(projectid, path, file, description)
> ./attachments/$projectid$/$path$/<br><a
> href="attachments/$projectid$/$path$/$file$">$file$</a>
> \end
>
> <$macrocall $name=linkdataset projectid = {{!!project-id}} path={{!!path}}
> file={{!!file-name}}/>
>
> Inserting <$tiddler tiddler=<<currentTab>>>***</$tiddler> in either the
> macro or the macro call does not result in the path being visible when the
> tiddler is in a tab.
>
> Is there a better way of generating a path to an external file?
>
> Cheers,
> Ulrik
>
>
>
> 2014-05-12 19:15 GMT+02:00 Ulrik Stervbo <ulrik.ster...@gmail.com>:
>
> I see. Thanks for clarifying.
>>
>> Cheers,
>> Ulrik
>>
>>
>> 2014-05-12 17:00 GMT+02:00 Jeremy Ruston <jeremy.rus...@gmail.com>:
>>
>> Hi Ulrik
>>>
>>> This results in no display of the field-info when in a tab in
>>>> MainTiddler:
>>>> # The TestTidler with the field info
>>>> Info: {{!!info}}
>>>>
>>>> # Main tiddler without the field info
>>>> <<tabs "[[TestTiddler]]">>
>>>>
>>>
>>> The problem here is that the <$list> widgets inside the tabs macro
>>> iterate through the variable "currentTab", and not "currentTiddler". The
>>> value of "currentTiddler" is unchanged by the tabs macro.
>>>
>>> With the syntax {{!!info}} the title defaults to the "currentTiddler"
>>> variable.
>>>
>>> An alternative way of achieving what you want is to use something like
>>> this:
>>>
>>> info: <$tiddler tiddler=<<currentTab>>>{{!!info}}</$tiddler>
>>>
>>> Here, we've wrapped the transclusion in a "tiddler" widget which sets
>>> the currentTiddler variable correctly for us.
>>>
>>>
>>>>
>>>> This results in display of the field-info in the tab in MainTiddler:
>>>> # The TestTidler with the field info
>>>> Info: {{!!info}}
>>>>
>>>> # TmpTab
>>>> {{TestTidler}}
>>>>
>>>> # MainTiddler without the field info
>>>> <<tabs "[[TmpTab]]">>
>>>>
>>>
>>> This works because the transclusion in TmpTab sets the current tiddler
>>> to the target tiddler.
>>>
>>> Best wishes
>>>
>>> Jeremy
>>>
>>>
>>>
>>>>
>>>> Is there a way around this? At the moment, I'm looking at nearly
>>>> duplicating a number of tiddlers with no added information.
>>>>
>>>> To remind me what information I would like to see included, I use
>>>> fields in my templates - is this misuse of fields?
>>>>
>>>> Thanks,
>>>> Ulrik
>>>>
>>>> --
>>>> 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 post to this group, send email to tiddlywiki@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Jeremy Ruston
>>> mailto:jeremy.rus...@gmail.com
>>>
>>> --
>>> 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/1H6yjmmLCCk/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> tiddlywiki+unsubscr...@googlegroups.com.
>>> To post to this group, send email to tiddlywiki@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to