Custom error via listener


Well-known member
So what i basically want is that i want return a custom error template if my condition is satisfied from listner without extending froums,account etc. The code i having is working perfectly without any trouble if i do extend actionindex of forum and else. But i don't want to extend everything that is present in controllerpublic i just want to extend one single thing that works everywhere and should return custom error template. So anyone knows how can i achive this.