As I understand, I have (at least) the following two possibilities to list entries of a channel:
Possibility 1:
{% for entry in craft.entries.section('example').find() %}
Possibility 2:
{% set entries = craft.entries.section('example') %}
{% for entry in entries %}
Unfortunately, I am not experienced enough to understand the advantages and the disadvantates of these both possibilities (e.g. performance related etc.)
The only thing I see: in possibility 2 I can reuse "entries" within the same template.
I would be grateful for some further information on the differences.
Thank you very much! MISC
.find()
is optional and can be removed under all circumstances.set
vsfind
is a false choice.set
stores a variable for later use, whilefind
reduces an ElementCriteriaModel down to an actual array. They can be used separately, or together... there is no direct conflict between the terms.