Awaiting an answer Templates

Remove items from profile dropdown - ALLURA Template

Asked by Nader A. 2 years ago Last activity 2 years ago

Hello, in the Allura template the top right where the profile/login name menu item exists, I want to remove the dropdown items like wishlist, orders etc. because I'm using the template for the look and feel. I like the design but do not intend to use for ecommerce. Those items aren't needed for me. How do I do this? I've looked around in the backend, but I can't seem to figure out how to disable those dropdown menu items under the login/profile at the top right of the page.

Thanks,
Nader

5 replies

Paul Frankowski Senior Staff

Hi Nader,

check if you have any Menu module published on "menu-modal" or "menu-right" or "menu" position, it can be one of them.

MiBa

Hi Nader,
edit templates\allura\features\menu.php

FIND Line 100

KEEP $html[] = '<div class="sp-module">';

DELETE if ($user->id === 0) {

KEEP $html[] = '<a class="sp-sign-in" href="' . Route::_('index.php?option=comusers&view=login') . '" ><span class="far fa-user me-1" aria-hidden="true"></span><span class="signin-text d-none d-lg-inline-block">' . Text::('HELIX_ULTIMATE_SIGN_IN_MENU') . '</span></a>';

DELETE START

} else {
$html[] = '<div class="sp-profile-wrapper">';
$html[] = '<a href="#" class="sp-sign-in"><i class="fas fa-user-circle" aria-hidden="true"></i> <span class="user-text d-none d-xl-inline-block"> ' . ($user->name ?? '') . '</span> <i class="fas fa-chevron-down arrow-icon" aria-hidden="true"></i></a>';
$html[] = '<ul class="sp-profile-dropdown">';
$html[] = ' <li class="sp-profile-dropdown-item">';
$html[] = ' <a href="/index.php/wishlist">' . Text::_('HELIX_ULTIMATE_USERWISHLIST') . '</a>';
$html[] = ' </li>';
$html[] = ' <li class="sp-profile-dropdown-item">';
$html[] = ' <a href="' . Route::
('index.php?option=comeasystore&view=orders') . '">' . Text::('HELIX_ULTIMATE_USERORDERS') . '</a>';
$html[] = ' </li>';
$html[] = ' <li class="sp-profile-dropdown-item">';
$html[] = ' <a href="' . Route::
('index.php?option=comusers&view=profile') . '">' . Text::('HELIX_ULTIMATE_USERPROFILE') . '</a>';
$html[] = ' </li>';
$html[] = ' <li class="sp-profile-dropdown-item">';
$html[] = ' <a href="' . Route::
('index.php?option=comusers&view=login&layout=logout') . '">' . Text::('HELIX_ULTIMATE_USER_LOGOUT') . '</a>';
$html[] = ' </li>';
$html[] = '</ul>';
$html[] = '</div>';
}

DELETE END

Nader A. Asked this

Thank you!

Nader A. Asked this

What if I just wanted to delete Wishlist and Orders only but keep Profile and Logout? Which code do I delete to achieve this in that last part of the code?

Paul Frankowski Senior Staff

Indeed, in that template "menu.php" file from folder: templates\allura\features\ - must be edited to remove those links.

Nader A. Asked this

Thanks!

MiBa

Revert changes and delete

        $html[] = ' <li class="sp-profile-dropdown-item">';

        $html[] = '     <a href="/index.php/wishlist">' . Text::_('HELIX_ULTIMATE_USER_WISHLIST') . '</a>';

        $html[] = ' </li>';

        $html[] = ' <li class="sp-profile-dropdown-item">';

        $html[] = '     <a href="' . Route::_('index.php?option=com_easystore&view=orders') . '">' . Text::_('HELIX_ULTIMATE_USER_ORDERS') . '</a>';

        $html[] = ' </li>';
Nader A. Asked this

Perfect! Thanks so much.

Log in to reply.