selection

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package selection provides experimental selected-partial rendering helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns placeholders for the selection template helpers.

func SelectionHTML

func SelectionHTML(ctx ...*partial.RenderContext) template.HTML

SelectionHTML renders the selected partial for a render context.

go-doc:sig func() html/template.HTML

func SelectionHeader

func SelectionHeader(ctx ...*partial.RenderContext) string

SelectionHeader returns the connector selection header name.

go-doc:sig func() string

func SelectionIs

func SelectionIs(values ...string) bool

SelectionIs reports whether the selected key matches any provided value.

go-doc:sig func(values ...string) bool

func SelectionValue

func SelectionValue(ctx ...*partial.RenderContext) string

SelectionValue returns the selected key for a render context.

go-doc:sig func() string

func Stage

func Stage() partial.RenderStage

Stage gives templates the selection helpers, which render selected child partials. They are made only for the templates that call them.

func WithSelectMap

func WithSelectMap(p *partial.Partial, defaultKey string, partials map[string]*partial.Partial) *partial.Partial

WithSelectMap configures the named partials that the selection helper can render.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL