aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Plack/Middleware/Debug/FixMyStreet/Template.pm
blob: 05cb9f18a7622dfd3486a0127423a05ae5198bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package Plack::Middleware::Debug::FixMyStreet::Template;

=head1 NAME

Plack::Middleware::Debug::FixMyStreet::Template -
small subclass for FixMyStreet-specific tweaks.

=head1 VERSION

Version 1.00

=cut

our $VERSION = '1.00';

use strict;
use warnings;
use parent qw(Plack::Middleware::Debug::Template);

sub show_pathname { 1 }

sub hook_pathname {
    my ($self, $name) = @_;
    $name =~ s/^.*templates\/web\///;
    $name;
}

sub ignore_template {
    my ($self, $template) = @_;
    return 1 if $template eq 'site-name.html';
}

1;