title: Building a Menu with anchor links as second menu level
body: <p>I am working on a menu, showing the first level as normal links. The second menu level should be build as anchor menu from the content elements. Inspired by <a href="http://www.typo3.net/forum/beitraege/menues/100408/" rel="nofollow">this post</a> I build the following ts:</p>
  
  <pre><code>lib.footerMenu = HMENU
  lib.footerMenu {
  1 = TMENU
  1 {
      wrap = &lt;ul class="nav"&gt;|&lt;/ul&gt;
      noBlur = 1
  
      NO = 1
      NO {
          wrapItemAndSub = &lt;li class="first"&gt;|&lt;/li&gt; |*| &lt;li&gt;|&lt;/li&gt; |*| &lt;li class="last"&gt;|&lt;/li&gt;
          ATagParams = class="first" |*| |*| class="last"
          after.cObject = CONTENT
          after.cObject {
              table = tt_content
              select {
                  pidInList = this
                  orderBy = sorting
                  where = colPos=1
                  languageField = sys_language_uid
              }
              wrap = &lt;ul&gt;|&lt;/ul&gt;
              renderObj = TEXT
              renderObj {
                  field = header   
                  dataWrap = &lt;li&gt;&lt;a href="#c{field:uid}"&gt;|&lt;/a&gt;&lt;/li&gt;
              }
          }
       }
    }
  }
  </code></pre>
  
  <p>producing something like that ('Arnold ipsum.' and 'Who the hell are you.' being CEs of the Homepage):</p>
  
  <pre><code>&lt;ul class="nav"&gt;
      &lt;li class="first"&gt;&lt;a href="/" class="first"&gt;Homepage&lt;/a&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="#c1"&gt;Arnold ipsum.&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#c11"&gt;Who the hell are you.&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href="team/"&gt;Team&lt;/a&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="#c1"&gt;Arnold ipsum.&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#c11"&gt;Who the hell are you.&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      ...
  &lt;/ul&gt;
  </code></pre>
  
  <p>The problem now is, that <em>this</em> (pidInList = this) always holds the actual page id and so the anchor menu of the actual page is appended to all main menu items. </p>
  
  <p>How to show the right anchor menu below every main menu?</p>