the tabs macro uses the variable 'currentTab' so you could test for
currentTiddler being empty and if so use the currentTab:
<$set name="currentTiddler" filter="[all[current]]" value=<<currentTiddler>>
emptyValue=<<currentTab>>>
<$text text={{!!month}}/>
</$set>
On Thursday, June 6, 2019 at 5:36:32 PM UTC+2, Brian Diamante wrote:
>
> Hi Tony,
>
> As usual, I left out a couple of important details. I'm using the tiddler
> referencing {{!!month}} as a template so pulling the field from the current
> tiddler is my intention. I'm trying to get around having to explicitly
> include the tiddler title in the fieldname reference (don't want to use
> {{October!!month}}).
>
> Adding a little more detail, my tiddler looks like this:
> <$macrocall $name="my-calendar"
> year={{$:/tdg/vars/calendar-schoolyear-startyear!!year}} month=10/>
>
> !! Reports Due This Month
> <div class="twocolumns">
> <div class="twocolumns-col">
> <$macrocall $name="custom-links" monthtag=October sorttype=<
> <cal-sort-type>> sortby=day/>
> </div>
> </div>
>
>
> I want to use this template in 12 tiddlers, one for each month, which will
> then be viewed in a separate tiddler via the tabs macro. I'm trying to get
> around having to manually change the month number (10 in the example above)
> and month tag (October in the example above) in each of the 12 month
> tiddlers. Generally speaking, I would have other uses for this type of
> abstraction as well, but can't get it to work.
>
> If I use a field reference ({{!!month}}, for example) insead of the
> explicit month number/tag, it works fine in the tiddler, but breaks in the
> tabs tiddler.
>
> I've tried various set widget combos and macros but can't get it to work.
>
> Thanks,
> Brian
>
> On Thursday, June 6, 2019 at 2:57:07 AM UTC-6, TonyM wrote:
>>
>> Brian
>>
>> In the text reference !!fieldname you are not specifying the tiddler name
>> as in tiddlername!!fieldname. Thus it applies to current tiddler not the
>> tiddler it is coded in.
>>
>> You can change the way you reference the fieldname in another tiddler by
>> including the tiddler name or set the current tiddler. The current tiddler
>> is set by default inside lists or you can use the tiddler widget
>>
>> <$tiddler tiddler=tiddlername>
>> in here current tiddler is tiddler name
>> So {{!!title}} is the same as
>> {{tiddlername!!title}} and <<current Tiddler>>
>> </$tiddler>
>>
>> I hope this helps because I can see you need to make this conceptual leap.
>>
>> Regards
>> Tony
>>
>>
--
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/362b2aea-7ed6-4485-85bd-fc597d551f4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.