Skip to content

Commit

Permalink
Access title directly from template
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Oct 6, 2024
1 parent eac9823 commit 052d83e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions panel/views/fields/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
'hidden' => $field->isHidden(),
]) ?>>
<?php foreach ($site->templates() as $template) : ?>
<?php $scheme = $app->schemes()->get('pages.' . $template->name()) ?>
<option value="<?= $template->name() ?>" <?php if ($template->name() === (string) $field->value()) : ?> selected<?php endif ?>><?= $this->escape($scheme->title()) ?></option>
<option value="<?= $template->name() ?>" <?php if ($template->name() === (string) $field->value()) : ?> selected<?php endif ?>><?= $this->escape($template->title()) ?></option>
<?php endforeach ?>
</select>

0 comments on commit 052d83e

Please sign in to comment.