menu

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MenuBlockType struct {
	// contains filtered or unexported fields
}

MenuBlockType provides both frontend rendering and admin UI for menu blocks.

This is a built-in block type that renders navigation menus with various styles.

func NewMenuBlockType

func NewMenuBlockType(store cmsstore.StoreInterface, logger interface {
	Error(msg string, args ...interface{})
}) *MenuBlockType

NewMenuBlockType creates a new menu block type.

func (t *MenuBlockType) GetAdminFields(block cmsstore.BlockInterface, r *http.Request) interface{}

GetAdminFields returns form fields for editing menu block configuration.

func (t *MenuBlockType) GetCustomVariables() []cmsstore.BlockCustomVariable

GetCustomVariables returns nil as menu blocks do not set any custom variables.

Render renders a menu block by loading menu items and generating HTML. Supports runtime attributes: depth, style, class, id for dynamic configuration.

func (t *MenuBlockType) SaveAdminFields(r *http.Request, block cmsstore.BlockInterface) error

SaveAdminFields processes form submission and updates the menu block.

func (t *MenuBlockType) TypeKey() string

TypeKey returns the unique identifier for menu blocks.

func (t *MenuBlockType) TypeLabel() string

TypeLabel returns the display name for menu blocks.

Jump to

Keyboard shortcuts

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