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
Linking to an anchor rather than an external place (Read 3427 times)
Paul Walters
Full Member
*
Offline



Posts: 267

Linking to an anchor rather than an external place
Nov 21st, 2010, 3:13pm
 
I am sure I am missing something very basic, or something that the forum has already discussed.  Yet, I don't find the answer.

I am exporting to HTML a long series of notes.  The notes are related in a particular manner.  The export template for a generic note includes this section:

Code:
^outboundBasicLinks(<ul>,<li>,</li>,</ul>,myCitation)^ 



where myCitation is a link type.  In the export, I want to replace the normal link to an external file (that Tinderbox generates automatically) with a link to internal anchor, so that clicking links navigates through the same file.

In other words, if outboundBasicLinks creates this:

Code:
<a href="MyNote.html">Blah Blah</a> 



I would want this instead:

Code:
<a href="#section1">Blah Blah</a> 



I can create internal anchors dynamically.  The trick is to adjust the export dynamically as I add or move links in my document.

Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Linking to an anchor rather than an external place
Reply #1 - Nov 21st, 2010, 3:22pm
 
Link creation codes - like ^basicLinks^ - expect the target to be the exported page. If the target needs to be something else you need to take a round-about route.  collect the notes you need into a set or list and use format() to coerce a list to a list of links. Link designators don't provide a workaround for the original scenario as you can't suppress the default link/link anchor.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: Linking to an anchor rather than an external place
Reply #2 - Nov 22nd, 2010, 12:59pm
 
Mark, thank you.  Your suggestion is actually more flexible than what I was trying to do.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print