Skip to content

Commit b3f5206

Browse files
authored
[5.0] Custom system error page (#41049)
1 parent 858c25b commit b3f5206

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

templates/system/error.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
// Set page title
3131
$this->setTitle($this->error->getCode() . ' - ' . htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'));
3232

33+
// Get the error code
34+
$errorCode = $this->error->getCode();
3335
?>
3436
<!DOCTYPE html>
3537
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
@@ -42,6 +44,9 @@
4244
<div class="error">
4345
<div id="outline">
4446
<div id="errorboxoutline">
47+
<?php if ($this->countModules('error-' . $errorCode)): ?>
48+
<jdoc:include type="modules" name="error-<?php echo $errorCode; ?>" style="none" />
49+
<?php else: ?>
4550
<div id="errorboxheader"><?php echo $this->error->getCode(); ?> - <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></div>
4651
<div id="errorboxbody">
4752
<p><strong><?php echo Text::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></strong></p>
@@ -58,6 +63,7 @@
5863
<li><a href="<?php echo Uri::root(true); ?>/index.php"><?php echo Text::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></li>
5964
</ul>
6065
<p><?php echo Text::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></p>
66+
<?php endif; ?>
6167
<div id="techinfo">
6268
<p>
6369
<?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
@@ -93,7 +99,6 @@
9399
</div>
94100
</div>
95101
</div>
96-
97102
<jdoc:include type="modules" name="debug" style="none" />
98103
</body>
99104
</html>

0 commit comments

Comments
 (0)