Answers.Body: <p>Thanks to help from Ryan on the Discord group, I found an answer. This being…</p>
  <pre class="lang-twig prettyprint-override"><code>// Call the channel
  {% for serviceEntry in craft.entries.section('service').limit(3).all() %}
    &lt;h1&gt;{{ serviceEntry.title }}&lt;/h1&gt;
    &lt;p&gt;{{ serviceEntry.excerpt }}&lt;/p&gt;
    &lt;ul&gt;
      // Call the block within the loop
      {% for block in serviceEntry.serviceList %}
        {% if block.type == &quot;list&quot; %}
          &lt;li&gt;{{ block.item }}&lt;/li&gt;
        {% endif %}
      {% endfor %}
    &lt;/ul&gt;
    // Same as above
    {% for block in serviceEntry.internalButton %}
      {% if block.type == &quot;internalButton&quot; %}
        // Create varible for url
        {% set url = block.buttonDestination.first() %}
        &lt;a href=&quot;{{ url.getUrl }}&quot; title=&quot;{{ block.buttonDescription }}&quot; aria-label=&quot;Button Link&quot;&gt;{{ block.buttonText }}&lt;/a&gt;
      {% endif %}
    {% endfor %}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-02T17:31:25.097Z
Answers.LastActivityDate: 2021-10-18T10:13:24.707Z
Answers.LastEditDate: 2021-10-18T10:13:24.707Z
Answers.UserDisplayName: Grant Smith
Body: <p>Very new to craft and hence sorry if this is very basic. I have created a service channel which contains some matrix fields. One for a list and one for button. My approach here may be wrong and hence please say if that is case. I appear to be in my service loop as the title and excerpt are outing, However, the matrix fields are not?</p>
  <p>If I <code>{% dd serviceEntry %}</code> this shows <code>[serviceList] =&gt; null</code> which perhaps explains why the isn't outputting, but not why the fields are <code>null</code>?</p>
  <pre><code>  &lt;div class=&quot;service card&quot;&gt;
      {% for serviceEntry in craft.entries.section('service').limit(3).all() %}
        &lt;h1&gt;{{ serviceEntry.title }}&lt;/h1&gt;
        &lt;p&gt;{{ serviceEntry.excerpt }}&lt;/p&gt;
        {% for block in entry.serviceList %}
        &lt;ul&gt;
        {% switch block.type %}
          {% case 'list' %}
          {% set item = block.item.one() %}
            &lt;li&gt;{{ block.item }}&lt;/li&gt;
        {% endswitch %}
        &lt;/ul&gt;
        {% endfor %}
        &lt;ul&gt;
        {% for block in entry.serviceList %}
          {% if block.type == &quot;list&quot; %}
          &lt;li&gt;{{ block.item }}&lt;/li&gt;
          {% endif %}
        {% endfor %}
        &lt;/ul&gt;
      {% endfor %}
    &lt;/div&gt;
  </code></pre>
  <p>Above are both the methods I have tried, neither of which work.</p>
  <p>Handle: ServiceList<br />
  Field Type: Matrix<br />
  Block types: List<br />
  Fields: Item</p>
  
Tags: <craft3><templating>
Title: Output Matrix field within Channel
ThreadText: # Output Matrix field within Channel
  
  (Asked by: username_0 on 2021-10-02)
  
  Very new to craft and hence sorry if this is very basic. I have created a service channel which contains some matrix fields. One for a list and one for button. My approach here may be wrong and hence please say if that is case. I appear to be in my service loop as the title and excerpt are outing, However, the matrix fields are not?
  
  If I `{% dd serviceEntry %}` this shows `[serviceList] => null` which perhaps explains why the isn't outputting, but not why the fields are `null`?
  
  ```
    <div class="service card">
      {% for serviceEntry in craft.entries.section('service').limit(3).all() %}
        <h1>{{ serviceEntry.title }}</h1>
        <p>{{ serviceEntry.excerpt }}</p>
        {% for block in entry.serviceList %}
        <ul>
        {% switch block.type %}
          {% case 'list' %}
          {% set item = block.item.one() %}
            <li>{{ block.item }}</li>
        {% endswitch %}
        </ul>
        {% endfor %}
        <ul>
        {% for block in entry.serviceList %}
          {% if block.type == "list" %}
          <li>{{ block.item }}</li>
          {% endif %}
        {% endfor %}
        </ul>
      {% endfor %}
    </div>
  
  ```
  
  Above are both the methods I have tried, neither of which work.
  
  Handle: ServiceList  
  Field Type: Matrix  
  Block types: List  
  Fields: Item
  
  **Tags:** craft3, templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-10-02. Score: 1
  
  Thanks to help from Ryan on the Discord group, I found an answer. This being…
  
  ```twig
  // Call the channel
  {% for serviceEntry in craft.entries.section('service').limit(3).all() %}
    <h1>{{ serviceEntry.title }}</h1>
    <p>{{ serviceEntry.excerpt }}</p>
    <ul>
      // Call the block within the loop
      {% for block in serviceEntry.serviceList %}
        {% if block.type == "list" %}
          <li>{{ block.item }}</li>
        {% endif %}
      {% endfor %}
    </ul>
    // Same as above
    {% for block in serviceEntry.internalButton %}
      {% if block.type == "internalButton" %}
        // Create varible for url
        {% set url = block.buttonDestination.first() %}
        <a href="{{ url.getUrl }}" title="{{ block.buttonDescription }}" aria-label="Button Link">{{ block.buttonText }}</a>
      {% endif %}
    {% endfor %}
  {% endfor %}
  
  ```
  
  
  ---
  
  