$link = Route::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language).'&Itemid=129');
The article links inside the category blog view top level and submenu items to use itemid 129 for URL. So opening the items as if you are in the top level menu item. even when you are in one of the submenu items.
In the submenu items it works fine. But the top level menu uses the last item in the submenu regardless of it being the highest menu item id. It takes sorting into account and just uses the last menu item id to build the link instead of the forced 129 (top level menu item)
Joomla 3.9.18
category blog layout override
even when not forcing a menu item id it still uses the last menu subitem to build the url.
attached a schematic of the menu how it is built to clarify stuff.
Labels |
Added:
?
|
Labels |
Added:
No Code Attached Yet
bug
Removed: ? |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-18 09:10:00 |
Closed_By | ⇒ | Hackwar |
Sorry for the late reply. I understand what you want to do, but this currently is actually expected behavior. The Itemid should not be forced for an otherwise complete URL, but instead the router should decide the Itemid. The downside to your approach is, that you have to not only modify the layout of the category blog, but also edit all other layouts which could generate the URL, for example modules or from smart search. Otherwise the same content would be reachable via more than one URL. That is why the core wont change this behavior.
If you want to have this changed for your site, you could create a plugin which removes the MenuRules rule from the content component router and replace it with your customised version of that behavior rule.
Since this is expected behavior, I'm closing this issue.
It's been almost 2 months and no activity. How come?