Documentation
¶
Index ¶
- func NewDynamic(requestMenu RequestMenu, depth int, writerTo menu.WriterTo) http.Handler
- func NewDynamicSub(requestMenu RequestMenu, fromDepth int, toDepth int, writerTo menu.WriterTo) http.Handler
- func NewStatic(root *menu.Node, depth int, writerTo menu.WriterTo) http.Handler
- func NewStaticSub(root *menu.Node, fromDepth int, toDepth int, writerTo menu.WriterTo) http.Handler
- type RequestMenu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDynamic ¶
func NewDynamicSub ¶
func NewDynamicSub(requestMenu RequestMenu, fromDepth int, toDepth int, writerTo menu.WriterTo) http.Handler
NewDynamicSub creates a static menu handler that is a sub tree of the given root, starting at fromDepth until toDepth. The menu is only written to the ResponseWriter if the is a tree at the given fromDepth for a menu item that matches the request path
func NewStatic ¶
NewMenuHandler creates a http.Handler that writes the given menu to the ResponseWriter, formatting it with the given menuHtml (to the given depth) while the menuHtml may handle the current request path in a special way.
func NewStaticSub ¶
NewStaticSub creates a static menu handler that is a sub tree of the given root, starting at fromDepth until toDepth. The menu is only written to the ResponseWriter if the is a tree at the given fromDepth for a menu item that matches the request path