The attached is very experimental. It changes one of the core files, so if I messed up with the code you might get a red screen of embarrassment. So *absolutely* *make a backup* not only at the start but from time to time as you work with it.
Just drag and drop the attached file into your TW. A green bar will appear indicating where to drop. Complete the dialog to import. Save. Reload to activate. The files include a macro that when invoked like <<MyTiddler>> returns a link to "My Tiddler Caption". This macro is used by the other bit of code, which overwrites the core prettylinks code to use the macro whenever you have a "pretty link" (e.g. a link with [[...]]). BUT, if your link includes a title inside it, then the manual title will 'win' over the caption. (e.g. [[My Inline Text|MyTiddler]] will show 'My Inline Text'). If you change your mind and don't want to continue using the caption links, then delete $:/core/modules/parsers/wikiparser/rules/prettylink.js Note that this code will supercede the default code during an upgrade. This may be a problem if this part of the code is ever changed though I don't think it has for 4 years now. Good luck! Mark On Friday, June 16, 2017 at 8:41:26 AM UTC-7, Stuart Amor wrote: > > Is there a way of making an internal link, such as [[Contents]] return the > caption field of the Contents tiddler (if it was available) rather than > title? > > To give you some background, I am writing a collaborative document and > section titles are starting to become length and subject to being changed > or reworded. I am therefore starting to work on a system where I am using > tiddler titles as a short succinct title and the caption field as the long > title. When creating the links its a lot easier to point them to the > shorter tiddler title, but it would be nice to allow the previewed text > (which is read by the uninitiated) to see the current long form. > > I know its possible to create a macro to do this, but I would like to do > it at a base level if possible? I have already managed to change list > fields etc to show captions instead, but links seem to have alluded me > > Kind regards, > > Stuart > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8d294902-fa11-4736-bfbb-7c24032a403b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Make-links-use-captions.json
Description: application/json

