Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Documentation and Tutorials >> v4.5 baselined aTbRef - new URL
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1225144639

Message started by Mark Anderson on Oct 27th, 2008, 5:57pm

Title: v4.5 baselined aTbRef - new URL
Post by Mark Anderson on Oct 27th, 2008, 5:57pm

I've updated aTbRef to v4.5.3 using v4.5.0 as the baseline (i.e. no explicit mention of per-release changes per v4.5). I'm using a new URL as the structure is changing (slowly!) and I don't want to break old links. I'm not sure if this new URL is permanent yet but wanted fellow Tinderbox users to get a chance to use an up to date resource.

http://www.acrobatfaq.com/atbref45/index.html

Title: Re: v4.5 baselined aTbRef - new URL
Post by Mark Anderson on Oct 28th, 2008, 5:51am

Oops, search feature was pointing to the old site. Kudos to John P for kindly flagging up the glich. The pages are now updated but search isn't returning anything from the new location. I assume we need to wait a little while for the site to get spidered.

Title: Re: v4.5 baselined aTbRef - new URL
Post by Mark Anderson on Nov 7th, 2008, 7:31am

Today, thanks to hints from Mark B, I solved the problem of how, in exported HTML to show an ancestor link for an exported alias. The latter export as discrete notes but their ^ancestor^ out (as at v4.5.3) is that of the original note. It proved quite easy in the end. Here's aTbRef45's 'basic' template code for the ancestor cookie-crumb link trail:

Code:
<tr>
     <td><b>^ancestors^ ^title^</b></td>
</tr>

We replace it with:

Code:
<tr>
     ^if(^getFor(parent,AgentQuery))^
     <td><b>^include(parent,/TEMPLATES/agent_ancestors)^ ^linkTo(parent)^ : ^title^</b></td>
     ^else^
     <td><b>^ancestors^ ^title^</b></td>
     ^endIf^
</tr>

Plus a new template 'agent_ancestors' used by the above:

Code:
^ancestors^

You may notice that the branch for handling aliases calls data for the parent item object.  You might think this would reference the original note's data, but in this context it doesn't and we get data for the containing agent. I'd expected to use the agent placeholder instead but that looks for a note actually called 'agent'. Indeed, this re-inforces the documentation that the agent object is only intended for us agent actions to allow the children (aliases) to get their parent's data.

Note too, how we get around the original-alias relationship by placing our conditional code in the template where this note is the one currently being processed and as aliases are exported.

The changes are live. Compare the link trials at the top of this page with those onthis page. The first is the original note exported, the second is one of its aliases exported to a different location.

Title: Re: v4.5 baselined aTbRef - new URL
Post by Mark Anderson on Dec 4th, 2008, 8:14am

Actually, I've discovered that the above fix for ancestors has a flaw in that the paths for the parent's ancestors are worked out from the context of the child - in effect TB calculates ^ancestors(this)^ when we want ^ancestors(current)^ although a usage setting such context doesn't exist. So although the right ancestors appear on screen the links don't work. Luckily, a fix for getting the correct ^ancestors^ of children of agents has been tested and will likely feed into the next release. Indeed the aTbRef45 site now uses such code to fix the issue.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.