type

AdminLoadContext

Read content for the signed-in user while a Go admin loader runs.

Example

go
post, err := ctx.Find(
  ctx.RouteParams["collection"],
  ctx.RouteParams["document"],
  ridu.FindOptions{},
)
if err != nil {
  return SummaryData{}, err
}
title, _ := post.Values["title"].StringValue()

Context values

PropertyTypeDescription
Contextcontext.ContextRequest cancellation context. Pass it to external services or other cancellable reads.
PathnamestringCurrent page path without the admin base path, such as /collections/posts/123.
RouteParamsmap[string]stringCollection, document, or global identifiers for a built-in route. A literal custom route has no route parameters.

How it works

Use List, Find, and Global for content reads; they bind the current actor and request locale with the application's configured fallback chain. Actor, ActorCollection, Locale, FallbackLocales, DisableFallback, and AllLocales options cannot override this policy.

Use Actor and ActorCollection when your external service needs application-specific access checks. URL parameters identify requested data; they are not permission grants.

Full signature

type AdminLoadContext struct { Context context.Context // Pathname is the normalized router-root path, without the /admin basename. Pathname string // RouteParams contains decoded core collection, document or global selectors. // These are request inputs, not authorization. Custom routes are literal paths. RouteParams map[string]string // contains filtered or unexported fields }

Source core/admin_loader.go:25

Methods

Related guides