forked from laysense/laysite
Prepare LaySite 1.5.1 page routing and template updates
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Content\DesignFieldError;
|
||||
use App\Content\DesignLibrary;
|
||||
use App\Content\McpSettings;
|
||||
use App\Content\PageHead;
|
||||
use App\Content\PageTemplates;
|
||||
use App\Content\Repository;
|
||||
use App\Content\SiteDesign;
|
||||
use App\Content\SiteIcon;
|
||||
@@ -27,7 +28,7 @@ final class DesignController extends AdminController
|
||||
}
|
||||
|
||||
return $this->render($request, 'admin-design', [
|
||||
'title' => '站点设计', 'items' => DesignLibrary::palettes(),
|
||||
'title' => '站点设计', 'items' => DesignLibrary::palettes(), 'defaultPaletteId' => (new Repository())->site()['palette_id'] ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -158,7 +159,7 @@ final class DesignController extends AdminController
|
||||
return $this->error($request, '找不到这项设计配置。', 404);
|
||||
}
|
||||
$repo = new Repository();
|
||||
$page = $repo->page('home');
|
||||
$page = $repo->homepage() ?? PageTemplates::find('cobalt-product');
|
||||
$page[$kind . '_id'] = (int) $id;
|
||||
|
||||
return (new SiteController())->renderPage($repo, $page, true);
|
||||
|
||||
Reference in New Issue
Block a user