Visibility Rules & Scheduling
Every block blueprint with advanced: true compiles an Advanced tab (_blocks_tab_advanced) giving editors fine-grained visibility, scheduling, and attribute controls evaluated server-side by BlockVisibilityEvaluator.
Context & Audience Visibility Rules
Section titled “Context & Audience Visibility Rules”| Field Key | Evaluated Where | Purpose |
|---|---|---|
_blocks_hide_on |
CSS / Frontend (meta.hideOn, data-blocks-hide-on) |
Hide a block on selected device breakpoints (mobile, tablet, desktop). Emits CSS-agnostic metadata mapped to utility classes by project views. |
_blocks_auth_state |
Server (BlockVisibilityEvaluator) |
Show to everyone, only logged-in visitors, or only guests. |
_blocks_roles |
Server (BlockVisibilityEvaluator) |
Restrict visibility to specific ProcessWire user roles (cache keys partition automatically by role tier). |
_blocks_languages |
Server (BlockVisibilityEvaluator) |
Restrict visibility to selected active LanguageSupport languages. |
_blocks_publish_from / _blocks_publish_until |
Server (BlockVisibilityEvaluator) |
Show a block only inside a scheduled date/time window. Automatically calls DependencyCollector::clampTtl() so cached pages and signed /_blocks/smart tokens expire right on schedule. |
_blocks_page_condition |
Server (BlockVisibilityEvaluator) |
Zero-SQL ProcessWire selector evaluated against the active page (for example `featured=1, template=article |
Safe Custom HTML Attributes (_blocks_attributes)
Section titled “Safe Custom HTML Attributes (_blocks_attributes)”Add custom data-*, aria-*, or role attributes to any block’s root wrapper in the Advanced tab:
AttributeSanitizerstrictly allows only lowercasedata-*(excluding internaldata-blocks*anddata-hx*),aria-*, androle.- Dangerous event handlers (
onclick,onload) and unsafe URI schemes (javascript:,vbscript:,data:,//) are stripped automatically.