Jump to content

Announcement bar only for login users


Recommended Posts

On 07/03/2021 at 11:40, kzm2020 said:

Is it possible to enable this for only logged in users?

I can't see it in the settings - you can enable it so that only logged in clients can view details of these alerts, but not that they are shown to everyone... which could put a potential new user in the ridiculous position that the site tells them there is a service issue, but they would be unable to see details of the issue! πŸ™„

this new "feature" only affects the 21 theme - Six is more sensible in not showing it by default.

if you were using a child theme of 21, then I would say to edit the relevant template and make it conditional on the client being logged in, but using anΒ  action hook would be an alternative...

<?php

# Hide Network Issues For Non-Clients Hook
# Written by brian!

function non_client_network_issues_hook($vars) {

	$client = Menu::context('client');
	if (!$client) {
		return array("openNetworkIssueCounts" => NULL);
	}
}
add_hook("ClientAreaPageHome", 1, "non_client_network_issues_hook");

only clients who are logged in will see the network issues warnings using this hook.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated