1
votes

I got a HMENU which uses images and stuff. (i removed that part here to keep it simple)

What i want is that each menuItem calls the controller which adds more special cases (related sublinks) to the menu. But the controller needs to know which pid is calling it. So the idea was to use settings to parse the pid to the controller.

Well that works but only the text "pid" will be parsed not its value like 439 or whatever pid the menuItem got.

How do i parse the value of a field?

If there is another solution with a different method that would be great too :)

how do i have to modify the keylines:

settings.pageUid = TEXT
settings.pageUid.field = pid

TYPOSCRIPT:

temp.CE_SUBNAVIGATION = HMENU
temp.CE_SUBNAVIGATION {
  special = directory
  1 = TMENU
  #1.noBlur = 1

  1.wrap = <nav class="content-subnavigation-container">|</nav>

  1.NO = 1
  1.NO {
    doNotLinkIt = 1
    stdWrap.cObject = COA
    stdWrap.cObject {



      40 = USER
      40 {
        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
        pluginName = reference
        extensionName = MyExt
        controller = Reference
        vendorName = VENDOR
        action = hmenulisting
        switchableControllerActions {
          Reference {
            1 = hmenulisting
          }
        }

        settings =< plugin.tx_myextname.settings
        persistence =< plugin.tx_myextname.persistence
        view =< plugin.tx_myextname.view
        update =< plugin.tx_myextname.update

        settings.pageUid = TEXT
        settings.pageUid.field = pid

      }



    }
  }
}
1
Apart from Jost's solution: Are you sure an Extbase plugin is the only way to achieve what you want? This solution sounds pretty weird :-).lorenz
as i asked, i am open for better solutions. thats the one that come to my mind first :)TomGrill Games
From your description it is unclear what should be the final result. Therefore it is hard to help you make it better. If you document your question with the desired output and which part you're doing in Extbase now, I can look into it.lorenz
well i know but its tough for me to explain it :) well i switched to another way with COA and CONTENT custom mysql querys. that works and i dont have to use extbase here.TomGrill Games

1 Answers

0
votes

What worked for me last time in a situation like this was using insertData:

settings.pageUid = TEXT
settings.pageUid {
    value = {field:uid} # Not pid, thats the id of the parent page
    insertData = 1
}