In my custom module I want to display a series of error messages for X, Y & Z. I have a single tag in the mod.[module_name].php file and I want to throw out an error if no id has been provided.
if ( !ee()->TMPL->fetch_param('contact_id') ) {
ee()->output->fatal_error(lang('missing_contact_id'));
}
Now when I add the tag without the id the message appears but with the text 'missing_contact_id' rather than what is defined in my $lang language file.
Is there a way to output this on the front end?
It's worth noting that all my language strings are displaying correctly from the various functions in the mcp.[module_name].php file and the views that I have set up.
Thank you.