Documentation ¶
Index ¶
Constants ¶
View Source
const Tag feature.Tag = "site-menulinks"
Variables ¶
View Source
var ( // LandingPageMenuItemFn is a preset MenuItemFn which provides a new-tab // link to the root path of the current domain // // LandingPageMenuItemFn does not require any permissions, however if any // are required, simply wrap LandingPageMenuItemFn within an inline func // and return the modified the results // // .AddItemFuncs(func(printer *message.Printer) (item *menu.Item, permissions feature.Actions) { // item, _ = LandingPageMenuItemFn // item.Icon = "fa-solid fa-dumpster-fire" // permissions = feature.NewAction(subject, verb, details...) // return // } LandingPageMenuItemFn = func(printer *message.Printer) (item *menu.Item, permissions feature.Actions) { item = &menu.Item{ Text: printer.Sprintf("View Website"), Title: printer.Sprintf("open the website landing page in a new tab"), Href: "/", Target: "_blank", Icon: "fa-solid fa-arrow-up-right-from-square fa-fw", } return } )
Functions ¶
This section is empty.
Types ¶
type CFeature ¶
type CFeature struct { site.CSiteFeature[MakeFeature] // contains filtered or unexported fields }
func (*CFeature) AddItemFuncs ¶
func (f *CFeature) AddItemFuncs(fns ...MenuItemFn) MakeFeature
func (*CFeature) SiteFeatureMenu ¶
type Feature ¶
type Feature interface { feature.SiteFeature }
type MakeFeature ¶
type MakeFeature interface { feature.SiteMakeFeature[MakeFeature] AddItemFuncs(fns ...MenuItemFn) MakeFeature Make() Feature }
func New ¶
func New() MakeFeature
func NewTagged ¶
func NewTagged(tag feature.Tag) MakeFeature
Click to show internal directories.
Click to hide internal directories.