title: hide page & subpages from menu
body: <p>I have the following page structure in TYPO3:</p>
  
  <pre><code>- 1
    - 2
    - 3
  - 4
    - 5
    - 6
  - 7
    - 8
    - 9
  </code></pre>
  
  <p>Now I want to have 1/* + 4/* included in the header menu and 4/* + 7/* in the footer menu. Since the header and footer menus are different, I cannot just use the "hide in menu" feature and need to do it in TypoScript instead.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>HEADERMENU = HMENU
  HEADERMENU {
      1 = TMENU
      1.expAll = 1
  
      1.NO = 1
      1.NO {
          stdWrap.if.value.field = uid
          stdWrap.if.equals = 7
          stdWrap.if.negate = 1
      }
  
      2 &lt; .1
  }
  
  FOOTERMENU &lt; HEADERMENU
  FOOTERMENU.1.NO.stdWrap.if.equals = 1
  </code></pre>
  
  <p>The problem with this is, that it still displays the pages 8+9 in the header and  2+3 in the footer, even if it does not display page 1/7 anymore. I know that I could use <code>if.isInList</code> and the provide all subpage IDs, but then I'd have to change the TypoScript everytime I add a new page. If possible, I'd like to dynamically exclude a page and all its subpages.</p>
  
  <p>How can I do that?</p>