Hi Eric:

On Jul 4, 1:02 am, Eric Shulman <[email protected]> wrote:
> > I only want the TOC to show up if there is a {{sectionTOC{}}} (or
> > other specified class) in the tiddler.
> ...
> > added a second parameter. So when invoked as: <<sectionTOC '' silent>>
>
> The currently supported way to do this is to add
>    <span class='sectionTOC'></span>
> to the ViewTemplate, and then embed the
>    <<sectionTOC>>
> macro at the end of each tiddler in which you want a TOC to be
> generated and displayed.
>
> In contrast, you are attempting the reverse approach by adding
>    <span macro='sectionTOC'></span>
> to the end of the ViewTemplate, and then embedding
>    {{sectionTOC{}}}
> within the desired tiddlers.
>
> Of course, both methods are equally valid and can produce similarly
> useful results.

The second way has the advantage that I can place front matter before
the TOC in the tiddler. If the {{sectionTOC{}}}
is embedded in the ViewTemplate, the toc has a fixed location.

>  In fact, I think that the handling you described --
> i.e., only rendering output if a matching 'target element' (e.g.,
> {{sectionTOC{}}}) is present --  should be the *default* behavior...
> after all, rendering a Table of Contents at the *end* of the tiddler
> doesn't really make much sense!

Yeah, that was kind of my idea.

> I've just updated the plugin (v1.2.1):
>    http://www.TiddlyTools.com/#SectionLinksPlugin
>
> After installing the update, you won't need to use either a classname
> placeholder or a special "silent"  param... just put the default
> macro='sectionTOC' (with no params) at the end of the ViewTemplate and
> then put the {{sectionTOC{}}} target element into each tiddler as
> desired.

Cool. Thanks for the fast update. I'll try it out and respond here if
I have any issues.

-- rouilj

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

Reply via email to