intoeetive/protectedlinks

Exception Templates

Closed this issue · 2 comments

Is there any way of customising the exception templates?

For example, the 'Link not found' or 'Login is required' errors. Normally we do this with the exception number as a template (E.g. 404.twig, 503.twig etc) but I can't see how to do this.

Does it need to be a setting or config option inside Protected Links maybe?

@bymayo the exception is throwed with 403 http code.
Therefore you could utilize 403.twig template. If you want specific error template for each case, you can check for {{ message }} variable

Perfect! I'll give that a go. I wasn't sure which error template number it was loading.

Thanks.