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 >> is ^title(name)^ the same as $Name?
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1486583799

Message started by james a. foster on Feb 8th, 2017, 2:56pm

Title: is ^title(name)^ the same as $Name?
Post by james a. foster on Feb 8th, 2017, 2:56pm

aTBref says that ^title(this)^ exports the title of a note, and "The value is the same as the Name attribute." But in my noted (version 6.6.5), $Title=="" even though the note has a $Name value.

I looked up the values for $Title and $Name in the attribute inspector

so my question is: huh???

Title: Re: is ^title(name)^ the same as $Name?
Post by Mark Bernstein on Feb 8th, 2017, 5:19pm

$Title is undefined (unless you've created a user attribute named Title).

The HTML Markup placeholder ^title^ will be replaced on export with the value of $DisplayName.  $DisplayName, in turn, is a read only attribute which is either (a) the value returned by evaluating $DisplayExpression, or (b) if $DisplayExpression is empty, the value of $Name.


Title: Re: is ^title(name)^ the same as $Name?
Post by Mark Anderson on Feb 9th, 2017, 6:13am

I've edited the ^title^ page for (hopefully!) better clarity.

Generally, for text HTML export ^title^ is fine. If exporting to other mark-up formats and ^title^ is exporting HTML entities for some characters, then use ^value($Name)^.

If using the offset version ^title(some-other-note)^ follow the rule of thumb:

^title("name only, use quotes")^
^title(/unquoted/fullpath/to/note named/name only, use quotes)^

IIRC, original design (when Tinderbox was a smaller less capable app) expected a path ($Path) but if passed a valid note title ($Name) could get the path from that (as long as the title is unique across the whole doc). This quote-title don't-quot-path rubric also holds good for action code when using references to attributes of other notes,

I've made a side note that the export code section needs some close re-reading for the next edition as it's some of the oldest of aTbRef's notes and some things may have changed/got simpler.

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.