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 >> Exporting links
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1236173017

Message started by AsafKeller on Mar 4th, 2009, 8:23am

Title: Exporting links
Post by AsafKeller on Mar 4th, 2009, 8:23am

(1) I am trying to export notes with both basic and text links to html. Seems that is a note has a URL attribute (in my case, a link to a Bookends reference), neither inboundLinks nor basiclinks to that note are exported. Is the URL "overtaking" this capability?

(2) I would like each of the exported links to be preceded by its link type; is this possible?
Thanks.

Title: Re: Exporting links
Post by Mark Anderson on Mar 4th, 2009, 9:32am

Please post your template's code so we've a common reference. What your describe sounds like incorrect outcome but there's insufficient detail to know where the app's at fault or it is (unintended) user error.

#2.  I don't believe you can access a link' linkType as you can a reference an attribute.  However, certain linkTypes (see here) allow you to filter link generation - inbound or outbound - by link type, though only discretely within the forms 'basic' 'text' or 'web' (latter outbound only).

Title: Re: Exporting links
Post by AsafKeller on Mar 4th, 2009, 10:52am

Thanks, Mark.
(1) Thus far the code is simple (see below). Notes have a URL attribute (such as bookends://sonnysoftware.com/64985) and a user defined attribute "Citation" (such as {Gerke et al., 2003, #64985}). When exporting HTML, the links are omitted from notes in which the URL attribute exists.

Code:
<h2>^title^</h2>
^text
^get(URL)
^get(Citation)
^inboundLinks^
^basiclinks^


(2) The inability to export a link's linkType seems to be an unfortunate handicap. Apologies, Mark. I now see that code such as below would allow me to do what I need. TB never ceases to amaze. Thanks.
Code:
^outboundWebLinks( [start, list-item-prefix, list-item-suffix, end, type] )^

Title: Re: Exporting links
Post by Mark Anderson on Mar 4th, 2009, 11:46am

Only time for a very brief check but it works for me - even with a $URL value set. FWIW, I always close all export tags - i.e. put a caret at the end of all export codes. Though you may leave these out it means TB has to guess (usually correctly!) where the code ends. I figure if I know where the code ends why, for the sake of a ^, make TB guess?

Ah, basic & inbound links are internal TB links. They can't link to Bookends as that is an external (web) link - like the URL attribute. Might be worth reviewing this page and its sub-pages.

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.