Collection Configuration

A collection configuration tells the Textstem admin how to manage a collection. It is read from resources/views/wrangler/posts/{slug}/config.json, and settings saved in the admin (stored on the collection's database row) replace its top-level keys. A new collection starts with this file:

{
    "widgets": ["thumbnail", "tags", "categories", "hierarchy"],
    "index_views": ["table", "cards"],
    "tag_type": "",
    "admin_table": [
        { "name": "title", "label": "Title" },
        { "name": "published", "label": "Status", "format": "publish-state" },
        { "name": "post_status", "label": "Visibility" },
        { "name": "updated_at", "label": "Modified" }
    ]
}

Widgets

widgets lists the extra panels shown in the post editor. The available widgets are:

  • thumbnail
  • tags
  • categories
  • hierarchy - a selector to set a 'parent post'

If the list is missing or empty, tags and categories are used.

Tag Types

Tags can be grouped into 'types'. tag_type names the type whose tags are offered for this collection's posts, or lists several (["News", "Zones"]), each shown as its own group. Leave it empty to offer only tags that have no type.

Index Views

Textstem supports several "index views" - ways of viewing lists of posts in a collection. These are:

  • table
  • tree
  • cards
  • calendar
  • map
  • columns
  • small-cards
  • large-cards

Each collection can enable one or more index views, and administrators switch between the enabled views. If none is configured, the standard sortable, filterable table view is used.

Table columns

admin_table sets the columns of the table and grid views, in order. Each entry takes:

Key Meaning
name A posts column, or a schema field. Names that aren't columns are read from the post's meta (meta->{name}).
label The column heading.
format The formatter used to show the value: a view in textstem::components.columns.formatters, such as publish-state, poststatus, modified, datetime, thumbnail-small or yesno.
sort Position of the column. Defaults to the order of the list.

Columns without a format use a default where there is one: published → publish-state, post_status → poststatus, updated_at and created_at → modified, thumbnail → thumbnail-small, published_at → datetime. Without admin_table, the table shows title, published and updated_at.

Older versions of this page used a table key with pagesize and columns. The package now reads only admin_table.

esc