feat: SEO field types and the complete SEO tab

This commit is contained in:
2026-10-27 11:04:03 +01:00
parent deebd9aa65
commit 93ddbcc9ef
26 changed files with 1827 additions and 50 deletions

23
field_types.go Normal file
View File

@@ -0,0 +1,23 @@
package seo
import (
"git.golem15.com/golem15/sm-seo-plugin/classes"
"git.golem15.com/golem15/sm-seo-plugin/controllers"
"git.golem15.com/golem15/summercms/modules/backpack"
"git.golem15.com/golem15/summercms/modules/pact"
)
// FormFieldTypes registers the SEO field types (classes.FieldTypes):
// seotext, mlseotext, seorobots, mlseorobots and seoimage. Their element
// bundle loads on every admin page, so the SEO tab works on other plugins'
// forms.
func (p *Plugin) FormFieldTypes() []pact.FormFieldType {
return classes.FieldTypes(func() *backpack.App {
if p == nil {
return nil
}
return p.app
}, controllers.PermissionManage)
}
var _ pact.HasFormFieldTypes = (*Plugin)(nil)