Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
^path^ works differently in 4.6? (Read 3410 times)
Allan Tsai
Full Member
*
Offline



Posts: 41

^path^ works differently in 4.6?
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?
Back to top
 
 

Tinderbox 4.7.1
Macbook Pro 2.4Ghz Intel Core 2 Duo, 4GB RAM
OS X 10.6.1
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: ^path^ works differently in 4.6?
Reply #1 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print