- journal-author (/blog/author/:author, :author the author slug else the login): references, Resolve, Records of the authors with a published post, Describe as a profile per locale, exact Match on the pattern - golem15.journal.author_pages false resolves nothing, describes empty URLs and never matches
24 lines
744 B
Go
24 lines
744 B
Go
package journal
|
|
|
|
import (
|
|
"git.golem15.com/golem15/sm-journal-plugin/classes"
|
|
"git.golem15.com/golem15/summercms/modules/backpack"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
)
|
|
|
|
// MenuItemTypes registers the Journal menu item types under their PHP keys
|
|
// (classes.MenuItemTypes) with a lazy accessor of the booted app, so menus
|
|
// and sitemaps can address Journal posts and categories through the
|
|
// framework's menu item type registry; posts, categories, tags and author
|
|
// pages (journal-author) carry content descriptors.
|
|
func (p *Plugin) MenuItemTypes() []pact.MenuItemType {
|
|
return classes.MenuItemTypes(func() *backpack.App {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.app
|
|
})
|
|
}
|
|
|
|
var _ pact.HasMenuItemTypes = (*Plugin)(nil)
|