Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Web.anchorLink

Web.anchorLink($label) -> HtmlString

Description

Create a # anchor link that lets users bookmark specific points in the page.

It will call toTokenCase() on the label to create a URL slug.

tm docsHtml {

    --- $sections = ['Apples', 'Oranges, etc.']
    --- foreach $sections as $section {

        <h3> {{ $section }} {{ Web.anchorLink($section) }}

        blah blah blah

    --- }
}

// Will create # links:
//   #apples
//   #oranges-etc

See Also