文件还在测试中
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/** @var array $p */
|
||||
$layout = [];
|
||||
if (!empty($p['layout'])) {
|
||||
$dec = json_decode($p['layout'], true);
|
||||
if (is_array($dec)) $layout = $dec;
|
||||
}
|
||||
// 模式渲染:可视化编辑(builder)且有 layout → 画布;否则固定版式正文。
|
||||
// 旧页面 mode 为空且含 layout 时仍走画布,保持向后兼容。
|
||||
$useBuilder = !empty($layout) && ($p['mode'] ?? '') !== 'fixed';
|
||||
?>
|
||||
<?php if ($useBuilder): ?>
|
||||
<?php echo \Core\View::buffer('parts/canvas', ['layout' => $layout, 'item' => $p, 'module' => 'page']); ?>
|
||||
<?php else: ?>
|
||||
<section class="page-hero">
|
||||
<div class="container"><h1><?php echo e($p['title']); ?></h1></div>
|
||||
</section>
|
||||
<section class="section" style="padding-top:24px">
|
||||
<div class="container" style="max-width:860px">
|
||||
<article class="detail-desc" style="font-size:16px;line-height:1.95"><?php echo $p['content']; ?></article>
|
||||
<div style="text-align:center;margin-top:36px"><a class="btn btn-primary magnetic" href="<?php echo site_url('contact'); ?>">联系我们</a></div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user