Mackski Posted December 12, 2015 Posted December 12, 2015 I'm using $session->message and $session->error for my front end. When using FieldtypeMapMarker module, a message displays after succesfully geocoding an address.(Which I want to suppress from the front end) Is this possible?Better still could the message and error functions allow an aditional boolean to signify a different intended use?: eg: $session->message('Well done!', Notice::frontEnd); // or user defined $session->error('Sorry, Broken!', 'MyMessages');
LostKobrakai Posted December 12, 2015 Posted December 12, 2015 You cannot add the constant to the Notice class without editing the core file, but the message method should be able to receive custom flags even if they are not a constants of the class.
Mackski Posted December 12, 2015 Author Posted December 12, 2015 Thanks Lost, after digging through the code it's quite obvious. Adding this worked: $session->message('Saved', true); Then just check when generating the notice messages: foreach($notices as $notice) { if($notice->flags > 1) continue; // only process front end notices // display notices... }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now