Give this a try:
1) create a tiddler, [[TOCPath/Macro]], tagged with "$:/tags/Macro", containing:
\define TOCPath()
<$list filter="[all[current]tags[]![prefix[$:/tags]limit[1]]">
<<TOCPath>> <$view field="title"/>
</$list>
\end
2) create a tiddler, [[TOCPath/Template]], tagged with $:/tags/ViewTemplate", containing:
<<TOCPath>> <$view field="title"/>
3) add "list-before" field to [[TOCPath/Template]], with a value of:
$:/core/ui/ViewTemplate/body
Notes:
1) the filter excludes 'system tags' (e.g. starting with "$:/tags"), and assumes that the *first* tag on the tiddler is it's "parent" in the TOC tree.
2) the template invokes the macro for the current tiddler and includes the current tiddler title in the output (as requested)
3) the list-before field places the output before the body text (as requested)
enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals
YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions: