Skip to content

Curating the Catalog

The catalog is the Add Section picker inside the editor — the menu of section types a content editor can insert into a page. By default it contains all 12 built-in sections plus any custom sections you've registered or discovered.

Curating the catalog lets you decide which section types appear in that picker, without breaking pages that already use a type.

The Add Section catalog
The Add Section catalog — the menu these methods control.

Catalog ≠ rendering

These filters affect only the Add Section picker. A section type that's already placed in a template keeps rendering on the published page even if you later hide it from the catalog — existing content never breaks.

Show only a short list

allowSections() takes an allow-list of slugs. When set, the catalog shows only those types — everything else is hidden, built-in or custom.

php
use FilamentCraft\FilamentCraftPlugin;

FilamentCraftPlugin::make()
    ->allowSections(['hero', 'features', 'cta']);

Use this when editors should work from a deliberately small, on-brand set.

Hide a few types

withoutSections() is the inverse: keep the full library except the slugs you name.

php
FilamentCraftPlugin::make()
    ->withoutSections(['pricing', 'logo-cloud']);

The named types are removed from the picker but stay registered, so any template already using them continues to render.

Drop the built-ins entirely

To remove all 12 built-in sections — for example when you ship your own complete library — turn them off:

php
FilamentCraftPlugin::make()
    ->withBuiltinSections(false)
    ->discoverSectionsIn(app_path('Sections'));

With withBuiltinSections(false), the built-in classes are never registered, so the catalog contains only your custom sections.

Configure via config/filamentcraft.php

allowSections() and withoutSections() write to config, so you can set the same values in config/filamentcraft.php instead of code:

php
'builtin_sections_enabled' => true,   // toggled by withBuiltinSections()

'sections' => [
    'allowed'  => ['hero', 'features', 'cta'],  // null = allow all
    'disabled' => ['pricing'],
],
Plugin methodConfig key
allowSections([...])filamentcraft.sections.allowed
withoutSections([...])filamentcraft.sections.disabled
withBuiltinSections(bool)filamentcraft.builtin_sections_enabled

The plugin methods take precedence when both are set.

How the rules combine

  1. Built-ins register only when builtin_sections_enabled is true (default).
  2. Custom sections register via registerSection() / discoverSectionsIn().
  3. The catalog then shows every registered type, filtered by allowed (if set) and minus disabled.

So allowSections() is a whitelist applied on top of whatever is registered, and withoutSections() is a blacklist — they can be combined, but allowSections() is the stronger constraint.

Proprietary — distributed via Anystack.