slots

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package slots provides experimental named regions backed by child partials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns template helpers for rendering slots.

func HasSlot

func HasSlot(name string, ctx ...*partial.RenderContext) bool

HasSlot reports whether a named slot exists in a render context.

go-doc:sig func(string) bool

func Name

func Name(p *partial.Partial) string

Name returns the slot name associated with a partial, if it was registered as a slot.

func Set

func Set(parent *partial.Partial, name string, child *partial.Partial) *partial.Partial

Set registers a child partial as a named slot on parent.

func Slot

func Slot(name string, ctx ...*partial.RenderContext) template.HTML

Slot renders a named slot from a render context.

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

func Stage

func Stage() partial.RenderStage

Stage installs slot helpers bound to the active render context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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