New answers tagged


This only works if the article you are attempting to get the menu item id for exists in a menu. i.e. if your menu only has a link to the category, but not the article, you will find your $Itemid = $menuItem->id; will throw a Trying to get property of non-object because $menuItem is not an object, rather an empty array. $articleId = 10; $link = 'index.php?...

Top 50 recent answers are included