From 6c558186df86df6d26832282701805af83b272b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 3 Sep 2012 18:53:23 +0200 Subject: [PATCH] L.img_tag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit weil L.html_tag aus templates heraus nicht in der lage ist undef als content zu übergeben --- SL/Template/Plugin/L.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index b3eaac9e7..c3411305a 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -83,6 +83,15 @@ sub html_tag { return "<${tag}${attributes}>${content}"; } +sub img_tag { + my ($self, @slurp) = @_; + my %options = _hashify(@slurp); + + $options{alt} ||= ''; + + return $self->html_tag('img', undef, %options); +} + sub select_tag { my $self = shift; my $name = shift; -- 2.20.1