mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-23 09:13:07 +01:00
19 lines
739 B
PHP
19 lines
739 B
PHP
<?= $this->layout('fields.field') ?>
|
|
<select id="page-parent" name="parent">
|
|
<option value="." <?php if ($page->parent()->isSite()): ?> selected<?php endif; ?>><?= $this->translate('panel.pages.newPage.site') ?> (/)</option>
|
|
<?php
|
|
foreach ($parents as $parent):
|
|
$scheme = $formwork->schemes()->get('pages.' . $parent->template()->name());
|
|
if (!$scheme->options()->get('pages', true)) {
|
|
continue;
|
|
}
|
|
if ($parent === $page) {
|
|
continue;
|
|
}
|
|
?>
|
|
<option value="<?= $parent->route() ?>"<?php if ($page->parent() === $parent): ?> selected<?php endif; ?>><?= str_repeat('— ', $parent->level() - 1) . $parent->title() ?></option>
|
|
<?php
|
|
endforeach;
|
|
?>
|
|
</select>
|