title: Adding sections (anchors) to a fluid menu in typo3 with bootstrap_package
body: <p>I would like to have a menu mixing pages and sections from current page.
  For example on page1:</p>
  
  <ul>
  <li>section1_from_page1</li>
  <li>section2_from_page1</li>
  <li>page2</li>
  <li>page3</li>
  </ul>
  
  <p>And on page2:</p>
  
  <ul>
  <li>section1_from_page2</li>
  <li>page1</li>
  <li>page3</li>
  </ul>
  
  <p>Until now, all I'm able to do is to build a new section menu with TypoScript :</p>
  
  <pre><code>lib.sectionnavigation = HMENU
  lib.sectionnavigation {
      1 = TMENU
      1 {
          sectionIndex = 1
          sectionIndex.type = header
          sectionIndex.useColPos = -1
          NO {
              ATagBeforeWrap = 1
              linkWrap = &lt;span&gt; | &lt;/span&gt; &lt;span class="bar"&gt;&lt;/span&gt;
              allWrap = &lt;li&gt; | &lt;/li&gt;
              allWrap.insertData = 1
          }
      }
      special = list
      special.value.data = page:uid
  }
  </code></pre>
  
  <p>And then add this menu in the Main.html partials from bootstrap_package, with <code>f:cObject</code> :</p>
  
  <pre><code>&lt;f:cObject typoscriptObjectPath="lib.sectionnavigation" /&gt;
  </code></pre>
  
  <p>However, that means that I have to maintain "format" (<code>&lt;li&gt;&lt;span&gt;...&lt;/span&gt;&lt;span class="bar"&gt;&lt;/span&gt;&lt;/li&gt;</code>) in both the TypoScript and the <em>Main.html</em> partial which is not convenient.
  For example, if I change the menu so that I don't need the bar class span, I'll have to update the partial and the TypoScript!</p>
  
  <p>From what I've understood, bootstrap_package defines the main menu in setup.txt:</p>
  
  <pre><code>10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
  10 {
      levels = 2
      includeSpacer = 1
      as = mainnavigation
  }
  </code></pre>
  
  <p>And then used this in the <em>Main.html</em> partial:</p>
  
  <pre><code>&lt;f:for each="{mainnavigation}" as="mainnavigationItem"&gt;
  </code></pre>
  
  <p>My first plan was to try to built an new array (similar to the one in <code>{mainnavigation}</code>) using TypoScript but I couldn't find a way!
  I also tried to use a MenuProcessor but didn't succeed either.</p>
  
  <p>Any help would be really appreciated!</p>
  
  <p>Thank you.</p>