Is it possible to output all of the possible options in a list field type (of a content type) as a view?
My own answer (but still feel free to chip in):
- Create a View of the Content Type containing the list.
- In the FIELDS section only have your Content Type Field that contains the list Content: (whatever the name of your list field is called)
- Click on your Content Type Field under FIELDS for the 'Configure field: Content: Your field' Under Multiple Field Settings, make sure display multiple fields on one row is unchecked
- add your Content Type Field to the FILTER CRITERIA. Filter should be set to 'is not empty' / not null
- over to the right hand side of the Views settings, enabled Aggregation
- back to FILTER CRITERIA and click Aggregation Settings for your content type field and select COUNT DISTINCT.
What this does is produce a unique list of items from all of the content that has this field with those items checked.
What it won't do is show items in from the list field if they have not yet been selected in any content.
It may also have a performance overhead to generate the list like this as it is based on the data from the entire set of content. The positive benefits flipside of this is that perhaps you only want to see items where there is content that has it checked and you may want to extend the list to include number of content using a list item.
Final thought - why did I not just use a taxonomy? this would have been far easier and Views supports this better. Reason: currently (at the time of writing), Views does not support context filtering on taxonomy where multiple arguments are provided in the URL. I want to use this list from this View as a menu block to filter data in a View in another block in Panels from multiple fields.
References / Credits:
The alternative option (the feasibility depends on the other requirements), would be to use a taxonomy vocabulary for holding all possible values.
In the node you can create a reference to a term in this vocabulary and use autofill or a drop down as a widget. In the node edit page you can list select the term you need.
In views you just load all terms of the given vocabulary.
In most cases I guess this will be easier, but you might have certain criteria they require the use of fields.