Trouble with ^inboundLinks()^ Syntax

I’m having trouble making ^inboundLinks^ do what I want. It’s not a big deal and if I can’t get it to work I’ll just delete this part of the export. But before I do, I wonder if anyone here can spot what I’m doing wrong?

In one of my templates I use the expression:

^value(format($PostDate,d MM y))^

In this template it produces the output I expect: (4 July 2017) if the attribute value is today’s date.

In a different template however, I use the same expression as part of an ^inboundLinks^ expression. That expression reads:

^inboundLinks(<div class="tagslist">,<p>, &nbsp;(^value(format($PostDate,d MM y))^)</p>,</div>,(tags|category))^

Everything in this expression works as expected except the date, which always returns “(never)”. What has me stumped is that export seems to be reading the expression correctly but returning an incorrect value.

Is there something I’m missing or does anyone have a suggestion about how to tweak/fix what I have?

UPDATE: The same thing is occurring when ^childLinks()^ is substituted for ^inboundLinks()^ so I’m guessing there’s something I’m missing about how these export codes work…

1 Like

Are you trying to get $PostDate for the item that is the source of the inbound links? See these link designators that let you inform Tinderbox of from where the attribute should be taken - i.e. the source or target of the link.

1 Like

“Yes” and “Doh!”

That’s the problem I was accidentally pulling the “never” from the link target not the various link sources.

Thanks.

In fairness, I ought to update the relevant pages in aTbRef to move the links to the designators closer to the code examples in the articles.