Answers.Body: <p>I've finally found this shame fault. I created a variable named footer to control the layout – that's not that good in combination with a field named footer.</p>
  
  <p>Sorry for stealing your time...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-11T20:34:16.473Z
Answers.LastActivityDate: 2018-01-11T20:34:16.473Z
Answers.UserDisplayName: Malte
Answers.Body: <p>I do not see anything obviously wrong with your code, but something that has caught me out many times is a misspelling of field names, so be sure your twig code matches your field names exactly. One thing that is a bit odd is the error message references "footerContent", but that does not appear in your code. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-08T15:57:24.807Z
Answers.Text: Ok, thanks.. that's because I've tested changing the field handle to ensure that's the right name.. (I've corrected it)
Answers.UserDisplayName: Malte
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-08T21:37:57.547Z
Answers.Text: I just put your code on a test page and it seems to work fine.
Answers.UserDisplayName: Roi Agneta
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-08T00:40:53.367Z
Answers.LastActivityDate: 2018-01-08T00:40:53.367Z
Answers.UserDisplayName: Roi Agneta
Body: <p>What could be the reason for this error when I’m targeting a global field?: </p>
  
  <p><code>Impossible to access an attribute ("footer") on a boolean variable ("").</code></p>
  
  <p>I created a global set <em>Footer</em> with a matrix field also named <em>Footer</em>, I'm trying to get its content via:</p>
  
  <pre><code>{% for block in footer.footer %}
    {% if block.type == "column" %}
      &lt;div&gt;
        &lt;h4&gt;{{ block.headline }}&lt;/h4&gt;
        &lt;div&gt;{{ block.columnContent }}&lt;/div&gt;
      &lt;/div&gt;
    {% endif %}
  {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-07T17:26:05.330Z
Comments.Text: We need more of your code in order to help you.  How do you fetch the global set, what are you doing with it after your loop
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-07T17:54:07.207Z
Comments.Text: @RobinSchambach Thanks for the advice, I added some lines. Do that help?
Comments.UserDisplayName: Malte
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-07T18:07:57.467Z
Comments.Text: Your code is actually correct. I created the set `footer` with the matrix field `footer` and the block `column` with the fields `headline` and `columnContent` and copied your code as it is with `{% set footer = craft.globals.getSetByHandle('footer')%}` and it works. You error must be related to your fields/your field handles or the field types. Since we don't know your layout we can't really help you
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-08T16:11:26.107Z
Comments.Text: Could you show us how you fetch your global set? Because of your error message I get the feeling you didn't fetch the set
Comments.UserDisplayName: Robin Schambach
Tags: <templating><matrix><globals>
Title: Access global field content
ThreadText: # Access global field content
  
  (Asked by: username_0 on 2018-01-07)
  
  What could be the reason for this error when I’m targeting a global field?:
  
  `Impossible to access an attribute ("footer") on a boolean variable ("").`
  
  I created a global set *Footer* with a matrix field also named *Footer*, I'm trying to get its content via:
  
  ```
  {% for block in footer.footer %}
    {% if block.type == "column" %}
      <div>
        <h4>{{ block.headline }}</h4>
        <div>{{ block.columnContent }}</div>
      </div>
    {% endif %}
  {% endfor %}
  
  ```
  
  **Tags:** templating, matrix, globals
  
  > **Comments:**
  > **username_1**: We need more of your code in order to help you.  How do you fetch the global set, what are you doing with it after your loop  
  > **username_0**: @username_1 Thanks for the advice, I added some lines. Do that help?  
  > **username_1**: Your code is actually correct. I created the set `footer` with the matrix field `footer` and the block `column` with the fields `headline` and `columnContent` and copied your code as it is with `{% set footer = craft.globals.getSetByHandle('footer')%}` and it works. You error must be related to your fields/your field handles or the field types. Since we don't know your layout we can't really help you  
  > **username_1**: Could you show us how you fetch your global set? Because of your error message I get the feeling you didn't fetch the set  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-01-11. Score: 1 | Accepted answer
  
  I've finally found this shame fault. I created a variable named footer to control the layout – that's not that good in combination with a field named footer.
  
  Sorry for stealing your time...
  
  
  ---
  
  ### Answer by username_2 on 2018-01-08. Score: 2
  
  I do not see anything obviously wrong with your code, but something that has caught me out many times is a misspelling of field names, so be sure your twig code matches your field names exactly. One thing that is a bit odd is the error message references "footerContent", but that does not appear in your code.
  
  > **Comments:**
  > **username_0**: Ok, thanks.. that's because I've tested changing the field handle to ensure that's the right name.. (I've corrected it)  
  > **username_2**: I just put your code on a test page and it seems to work fine.  
  
  ---
  
  