craftcms / craftcms/cms

Request: Matrix blocks conditional rules

Open
#3,462 3 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

matrix :dark_sunglasses:
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

It'd be great to have the ability to set conditional rules for matrix blocks being available on an entry. I generally have a matrix of all the content blocks available for a site, but there are often a few special blocks only for certain page types or structure levels. Would love it if I could use the same matrix across multiple entries but prevent certain blocks from being available under conditions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by reviewing how Matrix blocks are configured for entries, page types, and structure levels; the work is complete when a shared matrix can conditionally allow or prevent blocks for those contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
content
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.