labs / tiddlers / system / macros / $__ou_macros_LinksFromPath.tid
tags: $:/tags/Macro
title: $:/ou/macros/LinksFromPath
type: text/vnd.tiddlywiki

\define sectionFromPath(path)
<$list filter="[title[$path$]]"><$link><b>{{!!section}}</b></$link></$list>

\define linkFromPath(text, path)
<$list filter="[title[$path$]]"><$link><b>$text$</b></$link></$list>

A collection of macros for producing internal links from Tiddler paths.  Works in both Markdown and WikiText.


Renders a link displaying the given text for a tiddler at the given path.

<<linkFromPath text:"text that is displayed" path:"/path/to/tiddler">>


Renders a link displaying a tiddler's section number given a path.


<<sectionFromPath "/path/to/tiddler/with/section">>