BTC, this might be a little trivial, but seeing your macros made me 
inspired to try it out. It was fun to do and didn't take long since your 
examples had already done the hard parts!

Puts a link at the very top of all tiddlers to take you to the bottom, and 
vice versa.

*Tiddler*
title: Top of Tiddler Template
tags: $:/tags/ViewTemplate
list-before: $:/core/ui/ViewTemplate/title
\define inneranchor(place:"top")
<span id={{{ [[$(storyTiddler)$]addprefix[$place$-of-tiddler-]
encodeuricomponent[]addprefix[#]] }}}></span>
\end

\define inner-link(place:"top" name:"Top")
<a href={{{ [[$(storyTiddler)$]addprefix[$place$-of-tiddler-]
encodeuricomponent[]addprefix[##]] }}}>$name$</a>
\end

<<inneranchor>>
<<inner-link bottom Bottom>>

*Tiddler*
title: Bottom of Tiddler Template
tag: $:/tags/ViewTemplate
list-after: $:/core/ui/ViewTemplate/body
\define inneranchor(place:"top")
<span id={{{ [[$(storyTiddler)$]addprefix[$place$-of-tiddler-]
encodeuricomponent[]addprefix[#]] }}}></span>
\end

\define inner-link(place:"top" name:"Top")
<a href={{{ [[$(storyTiddler)$]addprefix[$place$-of-tiddler-]
encodeuricomponent[]addprefix[##]] }}}>$name$</a>
\end

<<inneranchor bottom>>
<<inner-link>>

If you prefer dragging it into tiddlywiki.com - attaching the two .json 
files.


On Friday, March 1, 2019 at 8:38:25 PM UTC+7, BurningTreeC wrote:
>
>  
>>
>>
> Instantly made two macros using your method
>
> one transcludes a tiddler and gives it an id starting with #, then the 
> title of the tiddler where it's transcluded, then the title of the 
> transcluded tiddler
>
> the other one creates a link to that transcluded tiddler within the same 
> tiddler
>
> \define transclude-inneranchor(tiddler:"",field:"text",mode:"block")
> <span id={{{ 
> [[$(storyTiddler)$]addsuffix<__tiddler__>encodeuricomponent[]addprefix[#]] 
> }}}>
> <$transclude tiddler=<<__tiddler__>> field=<<__field__>> 
> mode=<<__mode__>>/>
> </span>
> \end
> \define transclude-innerlink(tiddler:"")
> <a href={{{ 
> [[$(storyTiddler)$]addsuffix<__tiddler__>encodeuricomponent[]addprefix[##]] 
> }}}>link to inner-transcluded $tiddler$</a>
> \end
>
>
> I guess it won't work that well if the same tiddler is transcluded more 
> than once within the same storyTiddler using the transclude-inneranchor, 
> but I hardly do that
>
> It will also fail a bit if used outside of story tiddlers
>
> but ... good enough for many things! thanks again,
>
> btc
>

-- 
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/57b988a5-b91f-416a-96ae-cc090dcdbb16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: Top and Bottom of Tiddler Template.json
Description: application/json

Reply via email to