1

I have again some trouble with a Neo field.

I've a Neo field with different layouts. In one I will output content from some entries with a entries field.

The problem is: Sometimes I get output, sometimes I get only some of the selected entries as output and sometimes I don't get any output.

Here is my code:

{% nav block in entry.myContent.level(1) %}
    {% switch block.type.handle %}

        {% case 'team' %}
            <section class="block">
                <div class="wrapper">
                    {% include "_includes/elements/teamGetMember" %}
                </div>
            </section>
    {% endswitch %}
{% endnav %}

And here is the call of the entries field

{% set entries = entry.teamGetEntres %}

{% if entries | length %}
    {% for entry in entries %}
        <p class="description">{{ entry.description }}</p>
    {% endfor %}
{% endif %}
4
  • What isn't working @alexander? Is your code getting into the for loop or not outputting what you are expecting somewhere else...
    – Fyrebase
    Commented Sep 7, 2016 at 11:15
  • Can you post the rest of your NEO code? I am going to guess the first "set" should be something like {% set entries = block.teamGetEntres %} where "block" is what you are calling in your Neo. Commented Sep 7, 2016 at 12:38
  • Also, please don't title your requests NeoMatrix or Neo (Matrix)... they are two different fieldtypes. Commented Sep 7, 2016 at 12:43
  • @AbbeyDesign Sorry, I send the wrong post content. I've Updated my post just now.
    – The Frog
    Commented Sep 7, 2016 at 14:57

1 Answer 1

1

So it should be:

{% set entries = block.teamGetEntres %}
 {% if entries | length %}
  {% for entry in entries %}
    <p class="description">{{ entry.description }}</p>
  {% endfor %}
{% endif %}

replace "entry" in entry.teamGetEntries with "block"

1
  • It works, thank you.
    – The Frog
    Commented Sep 8, 2016 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.