feat: SEO field types and the complete SEO tab
This commit is contained in:
@@ -101,13 +101,21 @@ type stagingView struct {
|
||||
Staging bool
|
||||
}
|
||||
|
||||
// PartialData serves the staging callout: shown outside production, where
|
||||
// every page is noindex whatever the settings say (D-22).
|
||||
func (c settingsAdminController) PartialData(_ context.Context, name string, _ any) (any, error) {
|
||||
if name != "staging" {
|
||||
return nil, nil
|
||||
// PartialData serves the staging callout, shown outside production where
|
||||
// every page is noindex whatever the settings say (D-22), and the P3
|
||||
// placeholder table.
|
||||
func (c settingsAdminController) PartialData(ctx context.Context, name string, _ any) (any, error) {
|
||||
switch name {
|
||||
case "staging":
|
||||
return stagingView{Staging: IsStaging(appOf(c.app))}, nil
|
||||
case "placeholders":
|
||||
svc, err := classes.NewService(appOf(c.app))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return svc.Placeholders(ctx), nil
|
||||
}
|
||||
return stagingView{Staging: IsStaging(appOf(c.app))}, nil
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// IsStaging reports whether the application runs outside production. It
|
||||
|
||||
Reference in New Issue
Block a user