Skip to content

adminAppearanceSections ​

The sections a channel holds for a theme, in the order they are drawn, with footer_links last. Returns a plain list — one channel's page layout is not paginated.

Arguments ​

ArgumentTypeDescription
codeString!Theme code.
channelIntChannel ID. Falls back to the current channel.
localeStringLocale the options are read in. Must be one the channel runs; otherwise the app locale, then the channel's first locale.

Fields ​

FieldTypeDescription
idID!Resource IRI.
_idInt!Section ID.
nameStringName shown in the editor.
typeStringOne of the six section types.
themeCodeStringTheme the section belongs to.
channelIdIntChannel the section belongs to.
sortOrderIntPublished position.
statusIntPublished on/off — 1 or 0.
draftStatusBooleanStaged on/off, null when nothing is staged.
draftSortOrderIntStaged position, null when nothing is staged.
hasDraftString"1" when the section holds any staged edit, else "0".
isPinnedString"1" for footer_links, which is always drawn last.
createdAtStringISO 8601.
updatedAtStringISO 8601.
messageStringAction confirmation; null on reads.
translationsconnectionOne node per locale that has content, each with locale, options and draftOptions.

Use cases ​

  • Draw the editor list — the list is already in render order, so render it as returned rather than sorting by sortOrder, which would misplace a staged reorder and lift the footer.
  • Show an unpublished-changes banner — true when any node's hasDraft is "1".

Best practices ​

  • hasDraft and isPinned resolve as the strings "1" and "0". Compare against those, not against true.
  • options and draftOptions are JSON values and take no sub-selection — their shape changes per section type.
  • Ask for a channel explicitly. Without channel the current channel answers, which is rarely what a multi-channel editor wants.

Permissions ​

Requires appearance.sections.

Released under the MIT License.