Including block templates under different subdirectories How do I include block types that don't all sit under the one directory? My folder structure:

 - images
  - _blockName.html
 - mockups
  - ...
 - text
 - special


How I'm currently including the blocks (which isn't working):

{% extends "_layout" %}

{% block content %}
    {% for block in entry.widgets %}
        {% include "widgets/_" ~ block.type ignore missing %}
    {% endfor %}
{% endblock %}


How do I let craft know to look under each subdirectory?
It could get unwieldy if you have too many subfolder options, BUT... You CAN supply a list of templates to Twig's include tag. Twig checks each option, and includes the first template in the list that exists:

{% include
   [
    '_widgets/_images/_'  ~ block.type,
    '_widgets/_mockups/_' ~ block.type,
    '_widgets/_text/_'    ~ block.type,
    '_widgets/_special/_' ~ block.type
   ]
   ignore missing
%}


(The ignore missing tells Twig to fall back to rendering nothing if none of the templates exist. Otherwise it would throw an exception. A popular alternative is to have a default fallback template as the last item in the list.)

Bonus 2¢: I think it's good practice to keep include templates in hidden folders (i.e. _widgets/ instead of widgets/) — to signify to yourself and others that the directory does not match with a public route, and that its contents are never meant to be displayed directly.