Answers.Body: <p>First, make sure you have <a href="https://craftcms.com/docs/config-settings#devMode" rel="nofollow noreferrer">devMode</a> enabled so any errors will be show. Then, I would consider writing the template code in a way that will ensure something will output when looping through the block types to help troubleshoot.</p>
  
  <p>For example</p>
  
  <pre><code>{# Loop through each block #}
  {% for block in entry.comparisonChart %}
      {# Output templating based on the block type #}
      {% switch block.type %}
          {% case "compareChartHeadingBlock" %}
              &lt;h3&gt;{{ block.compareChartHeading }}&lt;/h3&gt;  
  
          {% case "compareChartTwoBlock" %}
              {% for row in block.compareChartTwo %}  
                  &lt;div class="row"&gt;
                    &lt;div class="box1-3 {{ row.empty }}"&gt;{{ row.chartTwoLeft }}&lt;/div&gt;
                    &lt;div class="{{ row.chartTwoAgree }} {{ row.chartTwoDisagree }} {{ row.chartTwoSeparate }}"&gt;&lt;/div&gt;
                    &lt;div class="box1-3 {{ row.empty }}"&gt;{{ row.chartTwoRight }}&lt;/div&gt;
                  &lt;/div&gt;
              {% else %}
                  Compare chart two has no content
              {% endfor %}
  
          {% case 'compareChartThreeBlock' %}
              {% for row in block.compareChartThree %}  
                  &lt;div class="row"&gt;
                      &lt;div class="box1-5 {{ row.empty }}"&gt;
                          {{ row.chart3Left }}
                      &lt;/div&gt;
                      &lt;div class="{{ row.chart3LeftAgree }} {{ row.chart3LeftDisagree }} {{ row.chart3LeftSeparate }}"&gt;&lt;/div&gt;
                      &lt;div class="box1-5 {{ row.empty }}"&gt;{{ row.chart3Center }}&lt;/div&gt;
                      &lt;div class="{{ row.chart3RightAgree }} {{ row.chart3RightDisagree }} {{ row.chart3RightSeparate }}"&gt;&lt;/div&gt;
                      &lt;div class="box1-5 {{ row.empty }}"&gt;{{ row.chart3Right }}l&lt;/div&gt;
                  &lt;/div&gt;
              {% else %}
                  Compare chart three has no content
              {% endfor %}
  
          {% default %}
              {# The message below will be displayed if the type doesn’t match those handled above #}
              This {{ block.type }}’s templating has not been handled
  
      {% endswitch %}
  
  {# If the Matrix has no blocks, output a message #}
  {% else %}
      This Matrix has no content
  {% endfor %}
  </code></pre>
  
  <p>An approach like the above should help narrow where the problem is occuring. If you do get error messages, please post them as it can help identify where the problem is occuring as well.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-26T13:42:07.070Z
Answers.Text: Thank you Stephen! That helped out so much  :) I was able to diagnose what was happening (mismatched labeling of matrix blocks). Appreciate the help! Working great now
Answers.UserDisplayName: Jayna
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-22T18:29:29.680Z
Answers.LastActivityDate: 2018-03-22T18:29:29.680Z
Answers.UserDisplayName: Stephen Bowling
Body: <p>I have a matrix table field that I want to render on a page. I've tried a few different things and nothing is working. I tried switch and elseif, but those weren't working. I'm no longer getting errors, but now - even though I have content in the fields - nothing shows up on the page. </p>
  
  <p>It seems like it must be a templating error but I can't see what it could be. Any help would be greatly appreciated. </p>
  
  <pre><code>{% for block in entry.comparisonChart %} 
  {% if block.type == 'compareChartHeadingBlock' %}
    &lt;h3&gt;{{ block.compareChartHeading }}&lt;/h3&gt;  
  {% endif %}
  
  {% if block.type == 'compareChartTwoBlock' %}
      {% for row in block.compareChartTwo %}  
      &lt;div class="row"&gt;
        &lt;div class="box1-3 {{ row.empty }}"&gt;{{ row.chartTwoLeft }}&lt;/div&gt;
        &lt;div class="{{ row.chartTwoAgree }} {{ row.chartTwoDisagree }} {{ row.chartTwoSeparate }}"&gt;&lt;/div&gt;
        &lt;div class="box1-3 {{ row.empty }}"&gt;{{ row.chartTwoRight }}&lt;/div&gt;
      &lt;/div&gt;
       {% endfor %}
    {% endif %}
  
  
    {% if block.type == 'compareChartThreeBlock' %}
      {% for row in block.compareChartThree %}  
      &lt;div class="row"&gt;
        &lt;div class="box1-5 {{ row.empty }}"&gt;{{ row.chart3Left }}&lt;/div&gt;
        &lt;div class="{{ row.chart3LeftAgree }} {{ row.chart3LeftDisagree }} {{ row.chart3LeftSeparate }}"&gt;&lt;/div&gt;
        &lt;div class="box1-5 {{ row.empty }}"&gt;{{ row.chart3Center }}&lt;/div&gt;
        &lt;div class="{{ row.chart3RightAgree }} {{ row.chart3RightDisagree }} {{ row.chart3RightSeparate }}"&gt;&lt;/div&gt;
        &lt;div class="box1-5 {{ row.empty }}"&gt;{{ row.chart3Right }}l&lt;/div&gt;
      &lt;/div&gt;
     {% endfor %}
    {% endif %}     
    {% endfor %}
  </code></pre>
  
  <p>Here is the matrix field:</p>
  
  <p><a href="https://i.sstatic.net/L3flP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/L3flP.png" alt="enter image description here"></a></p>
  
Tags: <templating><matrix><field>
Title: Matrix Table Content not showing
ThreadText: # Matrix Table Content not showing
  
  (Asked by: username_0 on 2018-03-22)
  
  I have a matrix table field that I want to render on a page. I've tried a few different things and nothing is working. I tried switch and elseif, but those weren't working. I'm no longer getting errors, but now - even though I have content in the fields - nothing shows up on the page.
  
  It seems like it must be a templating error but I can't see what it could be. Any help would be greatly appreciated.
  
  ```
  {% for block in entry.comparisonChart %} 
  {% if block.type == 'compareChartHeadingBlock' %}
    <h3>{{ block.compareChartHeading }}</h3>  
  {% endif %}
  
  {% if block.type == 'compareChartTwoBlock' %}
      {% for row in block.compareChartTwo %}  
      <div class="row">
        <div class="box1-3 {{ row.empty }}">{{ row.chartTwoLeft }}</div>
        <div class="{{ row.chartTwoAgree }} {{ row.chartTwoDisagree }} {{ row.chartTwoSeparate }}"></div>
        <div class="box1-3 {{ row.empty }}">{{ row.chartTwoRight }}</div>
      </div>
       {% endfor %}
    {% endif %}
  
    {% if block.type == 'compareChartThreeBlock' %}
      {% for row in block.compareChartThree %}  
      <div class="row">
        <div class="box1-5 {{ row.empty }}">{{ row.chart3Left }}</div>
        <div class="{{ row.chart3LeftAgree }} {{ row.chart3LeftDisagree }} {{ row.chart3LeftSeparate }}"></div>
        <div class="box1-5 {{ row.empty }}">{{ row.chart3Center }}</div>
        <div class="{{ row.chart3RightAgree }} {{ row.chart3RightDisagree }} {{ row.chart3RightSeparate }}"></div>
        <div class="box1-5 {{ row.empty }}">{{ row.chart3Right }}l</div>
      </div>
     {% endfor %}
    {% endif %}     
    {% endfor %}
  
  ```
  
  Here is the matrix field:
  
  [![enter image description here](https://i.sstatic.net/L3flP.png)](https://i.sstatic.net/L3flP.png)
  
  **Tags:** templating, matrix, field
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-22. Score: 1 | Accepted answer
  
  First, make sure you have [devMode](https://craftcms.com/docs/config-settings#devMode) enabled so any errors will be show. Then, I would consider writing the template code in a way that will ensure something will output when looping through the block types to help troubleshoot.
  
  For example
  
  ```
  {# Loop through each block #}
  {% for block in entry.comparisonChart %}
      {# Output templating based on the block type #}
      {% switch block.type %}
          {% case "compareChartHeadingBlock" %}
              <h3>{{ block.compareChartHeading }}</h3>  
  
          {% case "compareChartTwoBlock" %}
              {% for row in block.compareChartTwo %}  
                  <div class="row">
                    <div class="box1-3 {{ row.empty }}">{{ row.chartTwoLeft }}</div>
                    <div class="{{ row.chartTwoAgree }} {{ row.chartTwoDisagree }} {{ row.chartTwoSeparate }}"></div>
                    <div class="box1-3 {{ row.empty }}">{{ row.chartTwoRight }}</div>
                  </div>
              {% else %}
                  Compare chart two has no content
              {% endfor %}
  
          {% case 'compareChartThreeBlock' %}
              {% for row in block.compareChartThree %}  
                  <div class="row">
                      <div class="box1-5 {{ row.empty }}">
                          {{ row.chart3Left }}
                      </div>
                      <div class="{{ row.chart3LeftAgree }} {{ row.chart3LeftDisagree }} {{ row.chart3LeftSeparate }}"></div>
                      <div class="box1-5 {{ row.empty }}">{{ row.chart3Center }}</div>
                      <div class="{{ row.chart3RightAgree }} {{ row.chart3RightDisagree }} {{ row.chart3RightSeparate }}"></div>
                      <div class="box1-5 {{ row.empty }}">{{ row.chart3Right }}l</div>
                  </div>
              {% else %}
                  Compare chart three has no content
              {% endfor %}
  
          {% default %}
              {# The message below will be displayed if the type doesn’t match those handled above #}
              This {{ block.type }}’s templating has not been handled
  
      {% endswitch %}
  
  {# If the Matrix has no blocks, output a message #}
  {% else %}
      This Matrix has no content
  {% endfor %}
  
  ```
  
  An approach like the above should help narrow where the problem is occuring. If you do get error messages, please post them as it can help identify where the problem is occuring as well.
  
  > **Comments:**
  > **username_0**: Thank you username_1! That helped out so much  :) I was able to diagnose what was happening (mismatched labeling of matrix blocks). Appreciate the help! Working great now  
  
  ---
  
  