title: How do you pass the page id of the current menu element to a user function?
body: <p>I'm working on the following menu:</p>
  
  <pre><code>lib.content = HMENU
  lib.content {
    special = directory
    special.value.data = page:id
  
    wrap   = &lt;div id="productNavigator"&gt;|&lt;/div&gt;
    expAll = 1
  
    1 = TMENU
    1 {
      noBlur = 1
      expAll = 1
  
      NO {
        stdWrap.cObject = COA
        stdWrap.cObject {
  
          10 = IMAGE
          10 {
            file {
              import.cObject = USER
              import.cObject {
                userFunc = tx_dam_pages-&gt;get_media_file
                uid      = ???
                listNum  = 0
                slide    = 1
              }
            }
          }
  
          30 = TEXT
          30.field = title
          30.wrap = &lt;span class="text"&gt;&lt;span&gt;|&lt;/span&gt;&lt;/span&gt;
        }
      }
  </code></pre>
  
  <p>The idea is to pull the DAM image assigned to the page into the menu. But I have no idea how to pass the id of the menu element into the user function.</p>
  
  <p>If I add a constant value, it works great, every menu item gets the same image. But I want every menu item to have the image for the page it links to.</p>