az-digital / az_quickstart

UArizona's web content management system built with Drupal 10.
https://quickstart.arizona.edu
GNU General Public License v2.0
30 stars 20 forks source link

Update viewsreference argument field description with better help #2622

Open trackleft opened 1 year ago

trackleft commented 1 year ago

Motivation

A common question we get is, How do I configure the argument field when I already know the term ids Example:

I need a view to show only events that have both taxonomy terms present (undergraduate info session and in-person info session, for example). What’s the proper way to do that in the argument? “ID,ID” is not working, nor does ID+ID. Been a while since I’ve done that. Thanks!

To which, go on a mission to track down the clearest documentation about it.

The documentation for working with views arguments can be found under the “How to Create a View of a Specific Category” section of this page https://quickstart.arizona.edu/page-elements/views Enter an Argument to display only items in a certain category. (Leaving this blank will display all items.) The Argument must be the taxonomy term ID number of the category you wish to display. You can enter: Single taxonomy arguments: 4 Multiple taxonomy arguments: “4,6,3" (Taxonomy terms within double quotes and separated by comma) Single secondary taxonomy arguments: 8 (No double quotes used) Multiple secondary taxonomy arguments: 8 9 (No double quotes or comma used) For more information, see the Taxonomy page.

And end up supplementing that documentation with stuff like Comma signifies the AND operator Plus signifies the OR operator According to views documentation AND operator means that content has to have ALL the designated terms OR operator means that content has to have ANY of the designated terms.

Certain views have different requirements, which isn’t ideal, but for views with multiple accepted argument types. Example arg 1 taxonomy term, arg 2 content type

Proposed Resolution

Possibly help with this issue: https://www.drupal.org/project/viewsreference/issues/3304493 Or apply this patch: https://www.drupal.org/files/issues/2022-08-18/viewsreference-argument-description.patch

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Roles and Permissions considerations

A clear and concise description of how each of the following roles would be impacted by this change:

Additional context

Add any other context or screenshots about the feature request here.

trackleft commented 2 months ago

Related to #3443