Answers.Body: <p>I think what you want to look at is the Regular Expression option under the advanced tab for your my-site/news node. You could add something like:</p>
  
  <pre><code> /^my-site\/news/i
  </code></pre>
  
  <p>This way all of the child pages in that section will mark the News page as active.</p>
  
  <p>MW</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-05T20:10:53.157Z
Answers.Text: Thanks Michael, I would have never come up with that.... Could you elaborate what the `activeClassOnAncestors : true`, does differently?
Answers.UserDisplayName: Nutmeg
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-05T14:27:59.903Z
Answers.LastActivityDate: 2017-01-05T14:27:59.903Z
Answers.UserDisplayName: Michael Witwicki
Body: <p>I have a simple nav tag</p>
  
  <pre><code>{% set navConfig = {
      'startwithActive' : true,
      'maxDepth' : 2,
      'activeClassOnAncestors' : true,
      'ancestorActiveClass' : 'active',
  } %}
      {% nav node in navigation %}
  
        &lt;li{% if node.class %} class="{{ node.class }}"{% endif %}&gt;
          &lt;a href="{{ node.link }}"&gt;{{ node.title }}&lt;/a&gt;
          {% ifchildren %}
               &lt;ul class="dropdown"&gt;{% children %}&lt;/ul&gt;
          {% endifchildren %}
      &lt;/li&gt;
  {% endnav %}
  </code></pre>
  
  <p>This works fine all but with the News section entries. my-site/news adds the active class to the link, but my-site/news/new-entry doesn't add the class to the ancestor.</p>
  
  <p>I have tried most configurations with the available parameters and variables, but I cannot work it out.</p>
  
  <p>Any help would be brilliant!</p>
  
Tags: <navigation><menu>
Title: Active class on node with NAVEE
ThreadText: # Active class on node with NAVEE
  
  (Asked by: username_0 on 2017-01-01)
  
  I have a simple nav tag
  
  ```
  {% set navConfig = {
      'startwithActive' : true,
      'maxDepth' : 2,
      'activeClassOnAncestors' : true,
      'ancestorActiveClass' : 'active',
  } %}
      {% nav node in navigation %}
  
        <li{% if node.class %} class="{{ node.class }}"{% endif %}>
          <a href="{{ node.link }}">{{ node.title }}</a>
          {% ifchildren %}
               <ul class="dropdown">{% children %}</ul>
          {% endifchildren %}
      </li>
  {% endnav %}
  
  ```
  
  This works fine all but with the News section entries. my-site/news adds the active class to the link, but my-site/news/new-entry doesn't add the class to the ancestor.
  
  I have tried most configurations with the available parameters and variables, but I cannot work it out.
  
  Any help would be brilliant!
  
  **Tags:** navigation, menu
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-05. Score: 2 | Accepted answer
  
  I think what you want to look at is the Regular Expression option under the advanced tab for your my-site/news node. You could add something like:
  
  ```
   /^my-site\/news/i
  
  ```
  
  This way all of the child pages in that section will mark the News page as active.
  
  MW
  
  > **Comments:**
  > **username_0**: Thanks username_1, I would have never come up with that.... Could you elaborate what the `activeClassOnAncestors : true`, does differently?  
  
  ---
  
  