Getting error: "Matrix do not have a method or closure named..." I just playing first time with Matrix and can't figure whats wrong with this code, here's error code:

Craft\MatrixBlockModel and its behaviors do not have a method or closure named "naglowekPowitanie".


Matrix field config:


{% for block in entry.homepage %}
        {% if block.type == "powitanie" %}
            &lt;article id="main"&gt;

                &lt;header class="special container"&gt;
                    &lt;span class="icon fa-truck"&gt;&lt;/span&gt;
                    &lt;h2&gt;{{ block.naglowekPowitanie }}&lt;/h2&gt;
                    &lt;p&gt;{{ block.trescPowitanie }}&lt;/p&gt;
                &lt;/header&gt;

        {% elseif block.type == "wstep" %}
                    &lt;section class="wrapper style2 container special-alt"&gt;
                        &lt;div class="row 50%"&gt;
                            &lt;div class="8u 12u(narrower)"&gt;

                                &lt;header&gt;
                                    &lt;h2&gt;{{ block.wstepNaglowek }}&lt;/h2&gt;
                                &lt;/header&gt;
                                &lt;p&gt;{{ block.wstepTresc }}&lt;/p&gt;
                                &lt;footer&gt;
                                    &lt;ul class="buttons"&gt;
                                        &lt;li&gt;&lt;a href="#" class="button"&gt;{{ block.wstepPrzycisk }}&lt;/a&gt;&lt;/li&gt;
                                    &lt;/ul&gt;
                                &lt;/footer&gt;
        {% endif %}
{% endfor %}
On your screenshot of the block type powitanie you see two fields: powitanieNaglowek and powitanieTresc. Yet, in your code you try to use 

  &lt;h2&gt;{{ block.naglowekPowitanie }}&lt;/h2&gt;


The error simply says: in the block type you are using there is no field called naglowekPowitanie.

Changing that H2 to 

  &lt;h2&gt;{{ block.powitanieNaglowek }}&lt;/h2&gt;


should do the trick.