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
is ^title(name)^ the same as $Name? (Read 825 times)
james a. foster
Full Member
*
Offline



Posts: 130

is ^title(name)^ the same as $Name?
Feb 08th, 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???
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: is ^title(name)^ the same as $Name?
Reply #1 - 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.

Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: is ^title(name)^ the same as $Name?
Reply #2 - 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.
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