dynamic rendering patch

pages being rendered dynamically were not displaying properly due to
hitting a case that was not being captured. patched
This commit is contained in:
RXP 2025-03-19 23:39:14 -06:00
parent 44b8e9b5ad
commit 3ae9dbea00
Signed by: ro
GPG key ID: 976711B5057688B7
2 changed files with 11 additions and 4 deletions

View file

@ -42,21 +42,25 @@ class FrontController extends Controller
if (is_numeric($first)) {
if ($first == 00 || !isset($first)) {
$page = $pages->where('id', 1)->first();
$pageData = $this->sort->page($page);
$pageData = $this->sort->page($page, false);
$template = $currentTheme . '.index';
} else {
$page = $this->pages->getBySlug($third);
$pageData = $this->sort->page($page);
$pageData = $this->sort->page($page, false);
$template = $currentTheme . '.' . $page['layout'];
}
} else {
if ($first == null || $first == '') {
$page = $pages->where('id', 1)->first();
$pageData = $this->sort->page($page);
$page = $pages->where('id', 0)->first();
$pageData = $this->sort->page($page, false);
$template = $currentTheme . '.index';
} else {
$page = $this->pages->getBySlug($first);
$pageData = $this->sort->page($page, false);
$template = $currentTheme . '.' . $page['layout'];
}
}
return view($template, $pageData);
} else {
if (is_file('../public/index.html')) {

View file

@ -59,6 +59,9 @@ class RouteGetController extends Controller
case 'backup':
return $this->downloadBackup($second);
break;
default:
return $this->front->index($first, $second, $third);
break;
}
} else {
return $this->front->index($first, $second, $third);