b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 21 forks source link

Migration path for "menuItem.link" #18

Open infabo opened 4 years ago

infabo commented 4 years ago

menuItem.link -> is dropped, use Page-Link-VH with menuItem.uid

This description may need further description. page doktype=4 can't be handled 1:1 with f:link.page. same for doktype=3. Should at least be mentioned in the documention.

bmack commented 3 years ago

@infabo how would you handle it? How did you solve it?

davidsteeb commented 3 years ago

Couldn't you use f:link.typolink?

infabo commented 3 years ago

As far I remember, f:link.page did not resolve 1:1 as HMENU did it. I wrote my own viewhelper.

Can't remember about f:link.typolink. But I am not into writing custom viewhelpers when there are already ones that work. 😁 So it may had another shortcoming.

infabo commented 3 years ago

Couldn't you use f:link.typolink?

Had some time to dig.

Basically it were the difference how a) shortcuts in general b) shortcut to subpage and c) cross-rootpage and d) external-url links were "calculated". The first project I used b13/menus - mountpoints were a thing too.

In v10 it seems like at least some issues are no more. But still "shortcut to first subpage" does not generate the shortcut-target-url with typolink-viewhelper - it generates a URL to the shortcut page instead. And some other flaws which HMENU resolves manually after calling typolink(). Just had a look and did the same in my custom viewhelper.

So mehh, typolink-VH may work basically. But it is definitely no drop-in replacement for HMENU generated URLs.

bmack commented 3 years ago

@infabo how about we fix this in TYPO3 Core? Like: ANY link to a shortcut with "shortcut to first page" or "shortcut to specific page" should get resolved? This way, everybody in TYPO3 universe (and using typolink) could benefit from it?

In the meantime, we can add this to this extension, I guess, as the methods within PageRepository already exist