Skip to content

Commit 57fdfde

Browse files
pagination bug fixed and 404 page updated.
1 parent e9c1bcd commit 57fdfde

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,6 @@ nb-configuration.xml
128128
template
129129
app/Config/Routes.php
130130
*.zip
131-
.history
131+
.history
132+
.devilbox
133+
htdocs

app/Config/Pager.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ private function loadThemePaginationTemplates()
4646
$settings = (object)cache('settings');
4747
$themePath = APPPATH . "Views" . DIRECTORY_SEPARATOR . "templates" . DIRECTORY_SEPARATOR . "{$settings->templateInfos->path}" . DIRECTORY_SEPARATOR;
4848
$paginationTemplates = glob($themePath . 'pagination_*.php');
49+
4950
if (!empty($paginationTemplates)) {
5051
foreach ($paginationTemplates as $template) {
51-
if (file_exists($template)) {
52-
$templateName = basename($template, '.php');
53-
$this->templates[$settings->templateInfos->path] = "App" . DIRECTORY_SEPARATOR . "Views" . DIRECTORY_SEPARATOR . "templates" . DIRECTORY_SEPARATOR . "{$settings->templateInfos->path}" . DIRECTORY_SEPARATOR . "{$templateName}";
54-
}
52+
$templateName = basename($template, '.php');
53+
$this->templates[$settings->templateInfos->path] = "App\Views\\templates\\".$settings->templateInfos->path."\\".$templateName;
5554
}
5655
}
5756
}
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?= $this->extend('Views/templates/default/base') ?>
2-
<?= $this->section('head')?>
3-
<link href="<?=site_url('templates/default/assets/404.css')?>" rel="stylesheet" />
4-
<?=$this->endSection()?>
5-
<?=$this->section('content')?>
2+
<?= $this->section('head') ?>
3+
<link href="<?= site_url('templates/default/assets/404.css') ?>" rel="stylesheet" />
4+
<?= $this->endSection() ?>
5+
<?= $this->section('content') ?>
66
<section class="page_404">
77
<div class="container-fluid">
88
<div class="row">
@@ -16,11 +16,15 @@
1616
Look like you're lost
1717
</h3>
1818
<p>the page you are looking for not avaible!</p>
19-
<a href="<?=$referer?>" class="link_404">Go to Home</a>
19+
<?php if (empty($referer)) : ?>
20+
<a href="/" class="link_404">Go to Home</a>
21+
<?php else : ?>
22+
<a href="<?= $referer ?>" class="link_404">Go Back</a>
23+
<?php endif; ?>
2024
</div>
2125
</div>
2226
</div>
2327
</div>
2428
</div>
2529
</section>
26-
<?=$this->endSection()?>
30+
<?= $this->endSection() ?>

0 commit comments

Comments
 (0)