Skip to content
This repository was archived by the owner on Oct 30, 2021. It is now read-only.

Commit 1a91213

Browse files
committed
Moving stylesheet operation to initial php block and out of head
1 parent 10568ba commit 1a91213

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

component.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@
1414
// Define relative shortcut for current template directory
1515
$template = 'templates/' . $this->template;
1616

17+
$doc->addStyleSheet($template . '/css/print.css', 'text/css', 'print');
18+
if ($this->direction == 'rtl') {
19+
$doc->addStyleSheet($template . '/css/rtl.css', 'screen');
20+
}
21+
1722
// Check for layout override
1823
if (JFile::exists($template . '/layouts/component.php')) {
1924
include_once $template . '/layouts/component.php';
2025
}
2126
else {
22-
?>
23-
27+
?>
2428
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2529
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language ?>" lang="<?php echo $this->language ?>" dir="<?php echo $this->direction ?>">
2630
<head>
2731
<jdoc:include type="head" />
28-
<?php
29-
$doc->addStyleSheet($template . '/css/print.css', 'text/css', 'print');
30-
if ($this->direction == 'rtl')
31-
$doc->addStyleSheet($template . '/css/rtl.css', 'screen');
32-
?>
3332
</head>
3433
<body class="contentpane">
3534
<?php if ($this->countModules('print-popup')) : ?>

0 commit comments

Comments
 (0)