Answers.Body: <p>OK, so enabling the devMode helped point me in the right direction.  </p>
  
  <p>First, I needed to change it to </p>
  
  <pre><code>{% if currentUser and currentUser.isInGroup('advisors') %}
  </code></pre>
  
  <p>Otherwise I was getting an error message when nobody was logged in ("Impossible to invoke a method ("isInGroup") on a null variable").</p>
  
  <p>Then I discovered that the user I was testing wasn't added to any groups!  I could have sworn I set up the user with a group assigned, but apparently not.  :(</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-10T02:50:27.967Z
Answers.LastActivityDate: 2017-01-10T02:50:27.967Z
Answers.UserDisplayName: Todd
Body: <p>I'm trying to show a menu based on what group a user is in once they have logged in.  However, I'm not having any success.  Here is an example (for one of the groups) of what I have in my <code>_base.html</code> file, which I'm extending in my other pages:</p>
  
  <pre><code>{% if currentUser.isInGroup('advisors') %}
      &lt;div class="secondary-navigation"&gt;
          &lt;div class="row"&gt;
              &lt;div class="small-1 columns group"&gt;
                  &lt;h2&gt;Advisors&lt;/h2&gt;
              &lt;/div&gt;
              &lt;div class="small-11 columns navigation"&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;a href=""&gt;Advisors Home&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href=""&gt;Education&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href=""&gt;Blog&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href=""&gt;Events&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href=""&gt;Nav 5&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>Any suggestions would be most welcome!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-09T20:31:03.467Z
Comments.Text: That looks reasonable to me. What is it doing wrong?
Comments.UserDisplayName: Marion Newlevant
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-09T21:48:37.183Z
Comments.Text: It's not displaying the menu when I log in as a "client" user (or one of the others that I've got set up.
Comments.UserDisplayName: Todd
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-09T22:11:35.300Z
Comments.Text: So you log in as a client, which is in the `advisors` group, but that piece of the nav doesn't get displayed? Do you have `devMode` on?
Comments.UserDisplayName: Marion Newlevant
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-09T22:18:57.960Z
Comments.Text: No.  I'm a Craft noob, and wasn't aware of that.  I will enable it and do some more testing.  Thanks!
Comments.UserDisplayName: Todd
Tags: <user-groups>
Title: Trying to Add a Specific Menu Depending on User Group
ThreadText: # Trying to Add a Specific Menu Depending on User Group
  
  (Asked by: username_0 on 2017-01-09)
  
  I'm trying to show a menu based on what group a user is in once they have logged in. However, I'm not having any success. Here is an example (for one of the groups) of what I have in my `_base.html` file, which I'm extending in my other pages:
  
  ```
  {% if currentUser.isInGroup('advisors') %}
      <div class="secondary-navigation">
          <div class="row">
              <div class="small-1 columns group">
                  <h2>Advisors</h2>
              </div>
              <div class="small-11 columns navigation">
                  <ul>
                      <li><a href="">Advisors Home</a></li>
                      <li><a href="">Education</a></li>
                      <li><a href="">Blog</a></li>
                      <li><a href="">Events</a></li>
                      <li><a href="">Nav 5</a></li>
                  </ul>
              </div>
          </div>
      </div>
  {% endif %}
  
  ```
  
  Any suggestions would be most welcome!
  
  **Tags:** user-groups
  
  > **Comments:**
  > **username_1**: That looks reasonable to me. What is it doing wrong?  
  > **username_0**: It's not displaying the menu when I log in as a "client" user (or one of the others that I've got set up.  
  > **username_1**: So you log in as a client, which is in the `advisors` group, but that piece of the nav doesn't get displayed? Do you have `devMode` on?  
  > **username_0**: No.  I'm a Craft noob, and wasn't aware of that.  I will enable it and do some more testing.  Thanks!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-01-10. Score: 1 | Accepted answer
  
  OK, so enabling the devMode helped point me in the right direction.
  
  First, I needed to change it to
  
  ```
  {% if currentUser and currentUser.isInGroup('advisors') %}
  
  ```
  
  Otherwise I was getting an error message when nobody was logged in ("Impossible to invoke a method ("isInGroup") on a null variable").
  
  Then I discovered that the user I was testing wasn't added to any groups! I could have sworn I set up the user with a group assigned, but apparently not. :(
  
  
  ---
  
  