The Tree of Widsdom

智慧の樹

Anchor

^do( Anchor, sub-post name, post name, [linkname] )^

Type: Macro

Purpose: Adds a link to a bookbark (subsection heading)

The Anchor macro constructs a hyperlink to the heading-anchor of sub-post inside the exported note, post.

The link text will be the display name of sub-post unless you supply a 3rd argument.

Hover below to reveal BoxPress code

^if($Container($2))^<a href="^if(!$Name(current)=$1)^^url($1)^^endIf^#id_^value($HTMLExportPath($2).replace("(\/|\.)","))^">^if(^value($3)^)^ $3^else^^value($Name("$2"))^^endIf^</a>^else^^do(_ERROR, " Broken link ")^^endIf^

Anchor sample

This is the markup that is rendered below

See here: ^do(Anchor, "Build a BoxPress site on Amazon AWS", "Enable website hosting")^.

This includes the optional third arg: ^do(Anchor, "Build a BoxPress site on Amazon AWS", "Enable website hosting", "How to build your own website")^.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

See here:  Broken link .

This includes the optional third arg:  Broken link .

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

For a more involved sample, see Anchor sample.