Hi S.S.,
This is really amazing! Thank you for this discovery!
One question: Having this feature and the Viewtemplates you provided to
easily navigate to top/bottom of tiddlers:
Is it possible to use this feature for navigating from sidebar top and have
the clicked title (tiddler) at the top of screen (window)?
--Mohammad
On Saturday, March 2, 2019 at 12:50:23 PM UTC+3:30, S. S. wrote:
>
>
> 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/6599231d-aa42-4fe2-baed-dab481798691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.