fbpx

Trick or Treat - 30% OFF - Coupon Code: SCARY20 Grab the Deal!

Welcome, Guest
Username: Password: Remember me

TOPIC: Fix for broken links in megamenu and multi-language

Fix for broken links in megamenu and multi-language 4 months 3 weeks ago #22901

I had a situation where there was a space character that crept into my menu URL links before the final language parameter somehow, and then sub-menu item links were broken. After much research I discovered that Astroid had a template override in mod_menu, the default_component.php file. For some reason the developers discarded the Joomla default link filtering. To fix it, I replaced line 88 and restored the URL filter.
OLD:
echo '<a href="'.$item->link.' " title="'.$item->title.'"> <span class="nav-title">'.$iconHtml.$item->title.$badgeHtml.'</span>'.$subtitle.'</a>';

NEW:
echo '<a href="'.JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)).' " title="'.$item->title.'"> <span class="nav-title">'.$iconHtml.$item->title.$badgeHtml.'</span>'.$subtitle.'</a>';

I hope this helps someone. Please add this to the next release of Astroid! I will definitely keep using it!
Last Edit: 4 months 3 weeks ago by confidant_ca.
The administrator has disabled public write access.

Fix for broken links in megamenu and multi-language 4 months 2 weeks ago #22927

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4153
  • Thank you received: 609
  • Karma: 108
Got it. Thanks. Will add it for sure.

Thank you,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.260 seconds