From: Mike G. v. a. <we...@ma...> - 2008-06-25 16:30:34
|
Log Message: ----------- comments on how to link system.template and .css files added. no code changed VS: ---------------------------------------------------------------------- Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/lib/WeBWorK: ContentGenerator.pm Revision Data ------------- Index: ContentGenerator.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator.pm,v retrieving revision 1.191.2.1.2.1 retrieving revision 1.191.2.1.2.2 diff -Llib/WeBWorK/ContentGenerator.pm -Llib/WeBWorK/ContentGenerator.pm -u -r1.191.2.1.2.1 -r1.191.2.1.2.2 --- lib/WeBWorK/ContentGenerator.pm +++ lib/WeBWorK/ContentGenerator.pm @@ -480,6 +480,10 @@ my $themesDir = $ce->{webworkDirs}{templates}; my $theme = $r->param("theme") || $ce->{defaultTheme}; $theme = $ce->{defaultTheme} if $theme =~ m!(?:^|/)\.\.(?:/|$)!; + #$ce->{webworkURLs}->{stylesheet} = ($ce->{webworkURLs}->{htdocs})."/css/$theme.css"; # reset the style sheet + # the line above is clever -- but I think it is better to link directly to the style sheet from the system.template + # then the link between template and css is made in .template file instead of hard coded as above + # this means that the {stylesheet} option in global.conf is never used my $template = $self->can("templateName") ? $self->templateName : $ce->{defaultThemeTemplate}; my $templateFile = "$themesDir/$theme/$template.template"; |