Loop through all possible options of a Dropdown-field I'm currently trying to create a for-loop that loops through all options of a dropdown field created in Craft.

I have a field called "Season", with the possible options to choose from being "2015/16" and "2016/17". What I'm trying to do now is to create a loop that would loop as many times as there are options available in that field.

I'm thinking of something like this:  

{% for option in fields.season %}
    ...code...
{% endfor %}`


Is there a way to accomplish this within Craft?
{% for option in entry.dropdownFieldHandle.options %}
    &lt;li&gt;{{ option }}&lt;/li&gt;
{% endfor %}


That should be it :)

{% for entry in craft.entries.section('sectionname') %}
  {% for option in entry.dropdownFieldHandle.options %}
    &lt;li&gt;{{ option }}&lt;/li&gt;
  {% endfor %}
{% endfor %}


Use the above if it is only one page

{% set myArray = [] %}

{% for entry in craft.entries.section('sectionname') %}
  {% for option in entry.dropdownFieldHandle.options %}
        {% set value = option %}

        {% set myArray = myArray|merge([value]) %}
  {% endfor %}
{% endfor %}


And loop over that variable , better to load 1 variable as array if you need it over multiple pages. Just make sure all pages have access to this variable (or create a macro for it)