]> wagnertech.de Git - mfinanz.git/blob - SL/Layout/Design40Switch.pm
date error in mapping
[mfinanz.git] / SL / Layout / Design40Switch.pm
1 package SL::Layout::Design40Switch;
2
3 use strict;
4 use parent qw(SL::Layout::Base);
5
6 sub is_design40 {
7   $::myconfig{stylesheet} =~ /design40/i;
8 }
9
10 sub webpages_path {
11   is_design40() ? "templates/design40_webpages" : $_[0]->SUPER::webpages_path
12 }
13
14 sub webpages_fallback_path {
15   is_design40() ? "templates/webpages" : $_[0]->SUPER::webpages_fallback_path
16 }
17
18 sub allow_stylesheet_fallback {
19   !is_design40();
20 }
21
22 sub html_dialect {
23   is_design40() ? 'html5' : $_[0]->SUPER::html_dialect
24 }
25
26 1;
27
28 __END__
29
30 =encoding utf-8
31
32 =head1 NAME
33
34 SL::Layout::Design40Switch - Layout switch for Design 4.0
35
36 =head1 SYNOPSIS
37
38 Detects whether the user selected the Design4.0 stylesheet, and if so,
39 overrides some implementation details.
40
41 =head1 DESCRIPTION
42
43 Once activated, it will set the templates to use C<templates/design40_webpages> instead.
44
45 It will also disable css fallback, so that common.css etc won't interfere.
46
47 =head1 BUGS
48
49 None yet. :)
50
51 =head1 AUTHOR
52
53 Sven Schöling $<lt>s.schoeling@googlemail.comE<gt>
54
55 =cut