> But now I want to be able to write:
> --------------------
> include <<tiddler ##sect>>
> !sect
> The section text.
> --------------------
> To refer to a section in the same file (so it does not break when you
> rename the tiddler). And of course the same for slices.

http://www.TiddlyTools.com/#SectionLinksPlugin

extends the core handling for section references in several ways, one
of which is to allow an *implied* tiddler title, so the
"##sectionnname" will automatically reference a section in the current
tiddler.

Note: you *can* write an equivalent section reference without the
plugin, by using an 'evaluated parameter' to construct a fully-
qualified "TiddlerName##sectionname", like this:

   <<tiddler
{{story.findContainingTiddler(place).getAttribute("tiddler")
+"##sectionname"}}>>

Of course, this syntax is considerably more verbose and technical than
the implied tiddler name syntax provided by the plugin.  In addition,
evaluated parameters are disabled by default when using TiddlySpace,
so this method does not work for documents hosted there, unless you
also set:
   config.evaluateMacroParameters="full";
in a tiddler tagged with 'systemConfig'

Also note: SectionLinksPlugin only extends the handling for
"##sectionname", but not for "::slicename".  However, it should be
very easy to add that to the existing code.  I'll post a follow-up
when an updated plugin is available.

enjoy,
-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to