Vaulthalla Logo

Scoping

⚠️ When using collection-level or scoped config overrides, collectionSlug must be set correctly or collection-specific styling and behavior will not apply.

Collection scoping & overrides

This affects:

  • config.collections[slug]
  • scoped overrides (fields vs blocks)
  • layout behavior tied to collection context

Field usage

1<MarkdownRenderer2  collectionSlug="posts"3  markdown={post.content}4/>5

Scope behavior

The MarkdownBlockComponent automatically uses:

1scope = 'block'2

So you do not need to set it manually when using blocks.

When using MarkdownRenderer directly with scoped config, explicitly set:

1<MarkdownRenderer2  collectionSlug="posts"3  scope="field"4  markdown={post.content}5/>6

Scope rules

  • block → used internally by block renderer
  • field → required for direct renderer usage when using scoped config
  • unset → falls back to global / collection defaults

TL;DR

If you're using scoped config:

  • always pass collectionSlug
  • use scope="field" for direct renderer usage
  • let block components handle their own scope automatically