I'm trying to setup the router configuration for the first time in Joomla 4 and ran into a problem. I want to show the same item below different parent views. The parent views generate lists with items and for details i want to show the items on the same url, below the parent.
There are three Views a user could add in the menu: Listing, Search and Item.
These URls should be possible to generate:
- /search/item1
- /listing/item1
- /item1
The problem is that i can only generate these urls if i set something like
$itemView->setParent($searchView)
Or
$itemView->setParent($listingView)
But i need both, depending on the Menu-Item where the item should be displayed. Without setParent i get URLs like /search/?view=item&id=xx.
I'm happy for any ideas!