Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Exporting from Tinderbox >> ^path^ works differently in 4.6?
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1237932090

Message started by Allan Tsai on Mar 24th, 2009, 6:01pm

Title: ^path^ works differently in 4.6?
Post by Allan Tsai on Mar 24th, 2009, 6:01pm

I export agents and their children to HTML using the following code:

Code:
^justChildren(navChild)^


In "navChild" I linkify notes that have children. There's some extra code to show what the path is.

Code:
^if(^get(ChildCount)^)^
     <div class="childTitle">
           <a href="^root^^path^"> ^title^ </a>
           root=^root^<br>
           HTMLpath=^path^<br>
           TBX path=^get(Path)
     </div>
^endif^


Unless I'm dreaming (which is know to happen) this used to work pre-4.6. The path would be to the original note, not to the alias in the agent. Now however, the path returns the alias path instead. This remains the case even if use ^get(Path)^.

The functional outcome is that the agent HTML links are not looking for the original page, but instead for a duplicate page in the corresponding agent file folder. This can be resolved by forcing the agent to export children in TBX's HTML view, but this creates a duplicate of the page which defeats an element of convenience afforded by agents.

Has this functionality changed with 4.6?

Title: Re: ^path^ works differently in 4.6?
Post by Mark Anderson on Mar 24th, 2009, 6:26pm

It started changing a bit before that IIRC. From v3.6.0, in HTML export, an alias becomes a page in its own right with it's own path. In some cases, such as yours a single exported page may suffice, but in others such as documentation you do need the alias to be a discrete page (and linkable to as such). Some export codes have taken a while to catch up to this - e.g. ^ancestors changed to correctly show the alias' path only at v4.6.

I think you want to use ^linkTo(original)^ to make a link back to the original's exported page.

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.