Expand description
Page types: the PageTypeHandler trait every page kind implements,
its inventory registry (find_handler, registered_handlers),
and the editor-form types the handler returns (ExtensionField,
TabSpec, InlinePanelSpec, DisplayField).
#[derive(PageType)] generates the handler and forwards the
author-overridable hooks to PageTypeOverrides.
Structs§
- Children
Page - One window of a page’s
published_children. - Display
Field - One computed display chip rendered in the page-edit form’s “At
a glance” panel. See
PageTypeHandler::display_fields. - Extension
Field - Form-field metadata returned by
PageTypeHandler::extension_fields. The admin’s page-edit form renders one input per entry under the “Content” section so authors can write into the type’s extension table without leaving the editor. - Inline
Panel Spec - One inline panel declaration — a 1-N relation between the page
and a child table the handler maintains. See
PageTypeHandler::inline_panels. The admin editor renders each row as a card of widgets (anycrate::Widgetkind: selects, switches, the media chooser…) with add, remove and move up / down, in the Content tab or in a tab of its own (Self::in_tab). - Inline
RowSummary - One row of a per-row inline panel, as its card header shows it.
- Page
Type Handler Registration - Inventory entry — drop one of these next to each
PageTypeHandlerimpl (or usecrate::register_page_type!) and it becomes discoverable at runtime viaregistered_handlers. - TabSpec
- One handler-contributed tab appended to the page-editor’s
built-in tab strip (Content / Promote / Theme / Revisions). See
PageTypeHandler::extra_tabs.
Enums§
- Child
Order - How
published_children_pageorders a page’s children. - Extension
Field Kind - Which admin widget to draw for an
ExtensionField. - Inline
RowSaved - What
PageTypeHandler::save_inline_rowdid. - Panel
Layout - Layout direction for
TabBody::Group. - TabBody
- How a custom tab’s body is supplied. Three shapes:
Traits§
- Page
Type Handler - A page kind registered by user code (e.g.
BlogPostPage,LandingPage). - Page
Type Overrides - Optional-override trait for declarative page types defined via
#[derive(PageType)]. The derive emits the fullPageTypeHandlerimpl and delegates every author-overridable method (allowed_parent_types,allowed_child_types,is_creatable,feed_kind,display_fields,extra_tabs) to<Self as PageTypeOverrides>::*. Every method has a sensible default; an author that doesn’t need overrides writes a one-lineimpl PageTypeOverrides for MyPage {}.
Functions§
- all_
children - Every immediate child, ordered
sort_order, id— drafts, scheduled and expired pages included. For admin-side listings; never the public default. - any_
type_ view_ restriction truewhen any registered handler declares a per-typePageTypeHandler::view_restriction(#members). Cached — the handler registry is static for the life of the process — so the hot menu-filtering path can skip the per-type restriction lookup entirely on binaries that gate nothing by type.- default_
children - The framework-default children listing, backing
PageTypeHandler::children_query’s default: the same live children aspublished_children. - find_
handler - Look up a registered handler by
type_name. - published_
children - Immediate children a visitor can open right now, ordered
sort_order, id: published and not expired, or scheduled and past go-live — the same rule the resolver serves by (crate::resolver::visible_now). Error pages are left out: they are served for a status code, not listed as content (as inauto_menu). The building block for an index/listing page’sPageTypeHandler::children_queryoverride. - published_
children_ page - One window of the live children of
page: the same rows aspublished_children, ordered byorder, counted and paged in SQL. - registered_
handlers - All
PageTypeHandlers registered in the current binary.