aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index e5983ea23..75ca4dd81 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -66,5 +66,20 @@ sub tprintf {
return sprintf $format, @args;
}
+=head2 display_crossell_advert
+
+ [% display_crossell_advert( email, name ) %]
+
+Displays a crosssell advert if permitted by the cobrand.
+
+=cut
+
+sub display_crossell_advert {
+ my ( $self, $c, $email, $name ) = @_;
+
+ return unless $c->cobrand->allow_crosssell_adverts();
+ return CrossSell::display_advert( $c->req, $email, $name );
+}
+
1;