diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-07 16:18:55 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-07 16:18:55 +0100 |
commit | 8fde4a3ca2a84cb4afbc5096e853e016e27ea35a (patch) | |
tree | 6e3375d58bd5672a4aad1ed77a63b98e9ffecdad /perllib/FixMyStreet/App | |
parent | 42d7669ab494f2b8bf7f2209a7ce06fd8a373bc5 (diff) |
added newsletter sign up
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index 75ca4dd81..c8240948d 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -6,6 +6,7 @@ use warnings; use mySociety::Locale; use FixMyStreet; +use CrossSell; __PACKAGE__->config( TEMPLATE_EXTENSION => '.html', @@ -14,7 +15,7 @@ __PACKAGE__->config( ], ENCODING => 'utf8', render_die => 1, - expose_methods => [ 'loc', 'nget', 'tprintf', ], + expose_methods => [ 'loc', 'nget', 'tprintf', 'display_crossell_advert' ], ); =head1 NAME @@ -78,7 +79,12 @@ sub display_crossell_advert { my ( $self, $c, $email, $name ) = @_; return unless $c->cobrand->allow_crosssell_adverts(); - return CrossSell::display_advert( $c->req, $email, $name ); + + # fake up the old style $q + my $q = { site => $c->cobrand->moniker, }; + $q->{site} = 'fixmystreet' if $q->{site} eq 'default'; + + return CrossSell::display_advert( $q, $email, $name ); } 1; |