ROQ Posted August 10, 2022 Share Posted August 10, 2022 Hi guys, I'm trying to remove "Notifications" from the top-nav section but not sure how to add that to a hook, any ideas on the menu name etc? 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted August 10, 2022 Share Posted August 10, 2022 Hey there, Are you using the twenty-one theme? If so, you can remove the following code from the header.tpl file located in the /templates/twenty-one/ directory. <button type="button" class="btn" data-toggle="popover" id="accountNotifications" data-placement="bottom"> <i class="far fa-flag"></i> {if count($clientAlerts) > 0} {count($clientAlerts)} <span class="d-none d-sm-inline">{lang key='notifications'}</span> {else} <span class="d-sm-none">0</span> <span class="d-none d-sm-inline">{lang key='nonotifications'}</span> {/if} </button> <div id="accountNotificationsContent" class="w-hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {lang key='notificationsnone'} </li> {/foreach} </ul> </div> 0 Quote Link to comment Share on other sites More sharing options...
ROQ Posted August 11, 2022 Author Share Posted August 11, 2022 Thanks Lee, I'm currently using SIX. 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted August 11, 2022 Share Posted August 11, 2022 (edited) Hi there, In six its a little different, however the code is still in the header.tpl file. Change {if $loggedin} <li> <a href="#" data-toggle="popover" id="accountNotifications" data-placement="bottom"> {$LANG.notifications} {if count($clientAlerts) > 0} <span class="label label-info">{lang key='notificationsnew'}</span> {/if} <b class="caret"></b> </a> <div id="accountNotificationsContent" class="hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} </ul> </div> </li> <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} To {if $loggedin} <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} Excuse the formatting, its messed up in the code blocks and I cant seem to fix it! Edited August 11, 2022 by leemahoney3 1 Quote Link to comment Share on other sites More sharing options...
ROQ Posted August 11, 2022 Author Share Posted August 11, 2022 Perfect, thank you Lee! 0 Quote Link to comment Share on other sites More sharing options...
RadWebHosting Posted August 19, 2022 Share Posted August 19, 2022 On 8/11/2022 at 11:12 AM, leemahoney3 said: Hi there, In six its a little different, however the code is still in the header.tpl file. Change {if $loggedin} <li> <a href="#" data-toggle="popover" id="accountNotifications" data-placement="bottom"> {$LANG.notifications} {if count($clientAlerts) > 0} <span class="label label-info">{lang key='notificationsnew'}</span> {/if} <b class="caret"></b> </a> <div id="accountNotificationsContent" class="hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} </ul> </div> </li> <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} To {if $loggedin} <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} Excuse the formatting, its messed up in the code blocks and I cant seem to fix it! Brian Jr solving lots of threads 🙏 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.