Skip to content

Commit

Permalink
Reviewed PHP logic style switching in templates
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Peugnet <[email protected]>
  • Loading branch information
2 people authored and vincent-peugnet committed Oct 21, 2024
1 parent cb3af98 commit 0e106df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/view/templates/homeopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
<legend>Sort</legend>
<div>
<select name="sortby" id="sortby">
<?php foreach (Wcms\Opt::SORTBYLIST as $col) :
$name = Wcms\Model::METADATAS_NAMES[$col]; ?>
<option value="<?= $col ?>" <?= ($opt->sortby() == $col ? "selected" : "") ?> ><?= $name ?></option>
<?php foreach (Wcms\Opt::SORTBYLIST as $col) : ?>
<option value="<?= $col ?>" <?= ($opt->sortby() == $col ? "selected" : "") ?> >
<?= Wcms\Model::METADATAS_NAMES[$col] ?>
</option>
<?php endforeach ?>
</select>
<div>
Expand Down

0 comments on commit 0e106df

Please sign in to comment.