Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5c6e387a

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

  • ID 5c6e387a67cbc1594adaccfed4a555b2e01b3cd3
  • Vorgänger 6be84d46
  • Nachfolger b2298b2e

Layout: webpages_path jetzt im Layout

Unterschiede anzeigen:

SL/Presenter.pm
45 45
  # Look for the file given by $template if $template is not a reference.
46 46
  my $source;
47 47
  if (!ref $template) {
48
    my $webpages_path = $::request->layout->webpages_path;
49

  
48 50
    my $ext = $options->{type} eq 'text' ? 'txt' : $options->{type};
49
    $source = "templates/webpages/${template}.${ext}";
51
    $source = "${webpages_path}/${template}.${ext}";
50 52
    croak "Template file ${source} not found" unless -f $source;
51 53

  
52 54
  } elsif (ref($template) eq 'SCALAR') {
......
96 98
sub get_template {
97 99
  my ($self) = @_;
98 100

  
101
  my $webpages_path = $::request->layout->webpages_path;
102

  
99 103
  # Make locales.pl parse generic/exception.html, too:
100 104
  # $::form->parse_html_template("generic/exception")
101 105
  $self->{template} ||=
......
104 108
                    ABSOLUTE     => 1,
105 109
                    CACHE_SIZE   => 0,
106 110
                    PLUGIN_BASE  => 'SL::Template::Plugin',
107
                    INCLUDE_PATH => '.:templates/webpages',
111
                    INCLUDE_PATH => ".:$webpages_path",
108 112
                    COMPILE_EXT  => '.tcc',
109 113
                    COMPILE_DIR  => $::lx_office_conf{paths}->{userspath} . '/templates-cache',
110
                    ERROR        => 'templates/webpages/generic/exception.html',
114
                    ERROR        => "${webpages_path}/generic/exception.html",
111 115
                    ENCODING     => 'utf8',
112 116
                  }) || croak;
113 117

  

Auch abrufbar als: Unified diff