MyBB collections: custom content types like docs and recipes

amtekkie · Today

Collections add your own content types: docs, recipes, events, a portfolio, a directory. Each has an address, custom fields, categories, tags, layouts, filters and templates. These docs are a collection.

How it works
  • Each collection is a hidden MyBB forum; each entry is a thread (first post = content, replies = comments)
  • So forum permissions, moderation, drafts, attachments and soft delete just work
  • MyStudio adds fields, categories, addresses and layouts

Create a collection

  1. Activate Content Manager; open MyStudio → Content Manager → Collections.
  2. Add a Collection: name (Recipes), one entry's name (Recipe), address (recipes), description, icon.
  3. What entries have: parents, categories, tags, comments, featured image, excerpt, formats (MyCode; HTML for admins).
  4. The listing: layout, per page, sort, sitemap, search, structured data type, member writing.
  5. Add fields, then categories, then entries.
MyStudio collections admin listing collections with entries and fields
(1) Your collections with their address, entries and fields. (2) Entries, settings, fields, categories and permissions. (3) Add a collection.

Custom fields

The structured part of an entry, like a recipe's cooking time. Types:

text, long text, rich text, number, money, date, date and time, yes/no, select, multiple select, URL, email, image, file, colour, a link to another entry, a member.

Each has a label, help, required, default, choices, and whether it shows in lists, filters, sorts or is searched.

Listings and filters

LayoutsCards, list with excerpts, image grid, table with field columns, titles only.
Archives/recipes/category/desserts, /recipes/tag/vegan, /recipes/author/12.
FiltersSearch, filter (?f[time][max]=30) and sort; filtered pages stay out of search engines.

A navigation sidebar for docs

  1. Switch on Navigation sidebar and sort by Menu order.
  2. Pages get a sidebar with every category as a collapsible section; the current page is highlighted. On phones it's a drawer.
  3. Optional: a text field with key nav_label for short sidebar labels while titles stay long.

Docs pages also get bold, numbered section headings and step cards, as on this page.

Writing entries

Admin CPEntries with status tabs, search and the full form.
From the forumMembers write entries: at /recipes/write, if their group may post threads there.
StatusesDraft, awaiting review, published, scheduled, trash.

Comments

Under each entry, moderated on the page; who may comment follows the forum's reply permission.

Templates per collection

Generic templates (ms_coll_entry, ms_coll_list…) can be overridden per collection as ms_coll_{slug}_{name}, e.g. ms_coll_recipes_entry, in a child theme.

Show entries anywhere

[collection=recipes limit=5 category=desserts layout=cards]

Every option, single entries, fields and the PHP API: querying collections.

SEO

Clean addresses (/recipes/chocolate-cake), meta description from the excerpt, canonical, share images, breadcrumbs, Article structured data (or Technical article, Blog post, News article, Web page), and the sitemap.