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 %}
  • What isn't working @alexander? Is your code getting into the for loop or not outputting what you are expecting somewhere else... – Fyrebase Sep 7 '16 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. – AbbeyDesign Sep 7 '16 at 12:38
  • Also, please don't title your requests NeoMatrix or Neo (Matrix)... they are two different fieldtypes. – AbbeyDesign Sep 7 '16 at 12:43
  • @AbbeyDesign Sorry, I send the wrong post content. I've Updated my post just now. – The Frog Sep 7 '16 at 14:57
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"

  • It works, thank you. – The Frog Sep 8 '16 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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