As you can see in issues such as #923934: Add support for OR in block visibility conditions and #361918: Change "Page specific visibility settings" in block configuration to more meaningful language., the UI for visibility settings for a block can confuse users. Some questions they may have and to which the UI doesn't provide any clue:
- What is the difference between "Pages" visibility settings and "Content types" ones? Aren't nodes supposed to be pages too? What if I'm on a page listing several nodes?
- Visibility settings are split in sections ("Pages", "Content types", "Roles", "Users") ; do the settings between these sections add up (AND filter) or are they independent from each other (OR filter)? If I set a path under "Pages" and I check a content type under "Content Types", will the block show on both the given path and node pages of this content type (many results), or will it show only if the given path is a node of the right content type (one result)?
In the first case, the help text in the "Content types" section should be more explanatory. Currently it is Show this block only on pages that display content of the given type(s)., which leaves a doubt about some pages (will the block display on a page listing blog posts teasers, because it displays content of the given type?).
In the second case, it could be useful to add a short help text just below the "Visibility settings" label, such as "The block will only be visible if all the conditions below are met".
Comment | File | Size | Author |
---|---|---|---|
#1 | block_visibility_ui-0-D7.patch | 1.34 KB | mdupont |
Comments
Comment #1
mdupontHaving a quick go at a patch.
Comment #2
mdupontBumping to 8.x-dev. The patch is small and contains a more meaningful rewording of some descriptions.
Comment #3
kscheirer#1: block_visibility_ui-0-D7.patch queued for re-testing.
Comment #5
komlenic CreditAttribution: komlenic commentedWould it be beneficial to add a toggle so that block visibility settings can be either match all [logical AND] (the current behavior) or match any [logical OR]?
I have encountered several situations where a "match any" situation would be desirable, and judging from several issues and threads, it is a need that currently seems to require php filter and custom code, or several other modules to achieve.
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedComment #15
darvanenDiscussed in Bug Smash Initiative triage meeting.
Point 1 is a duplicate of [#32301625] and #2451461: Hide/show block page visibility negate form element if pages form element is/is not empty.
Point 2 is a duplicate of #923934: Add support for OR in block visibility conditions.
Though this issue is older than those referenced by point 1 it contains more than one concept, so opting to close this in favour of more focussed issues.