Fix: ROI_Bootstrap_Nav_Walker - allow dropdown links with URLs to navigate
- Apply same fix to NavbarRenderer's walker class - Only add data-bs-toggle=dropdown for items without real URL - Fixes Buscador General link navigation
This commit is contained in:
@@ -328,7 +328,12 @@ class ROI_Bootstrap_Nav_Walker extends Walker_Nav_Menu
|
||||
$atts['class'] = 'nav-link';
|
||||
if ($args->walker->has_children) {
|
||||
$atts['class'] .= ' dropdown-toggle';
|
||||
// Only add data-bs-toggle if no real URL (allows click navigation on desktop)
|
||||
// CSS hover handles showing dropdown, data-bs-toggle only needed for mobile
|
||||
$url = !empty($item->url) ? $item->url : '';
|
||||
if (empty($url) || $url === '#' || $url === '#!') {
|
||||
$atts['data-bs-toggle'] = 'dropdown';
|
||||
}
|
||||
$atts['role'] = 'button';
|
||||
$atts['aria-expanded'] = 'false';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user