Controllers+Views: Move tag splitting logic to controller

This commit is contained in:
Riyyi
2022-12-03 13:02:28 +01:00
parent 0138a14c29
commit f7c6276a7a
2 changed files with 14 additions and 9 deletions
+1 -7
View File
@@ -15,13 +15,7 @@
</p>
<?php if (_exists($post, 'tag')) { ?>
<small>
<i>
tags:
<?php $tags = ($this->tags)($post['tag']); ?>
<?php foreach ($tags as $key => $tag) { ?>
<?= $tag . (($key === array_key_last($tags)) ? '' : ', '); ?>
<?php } ?>
</i>
<i>tags: <?= ($this->tags)($post['tag']); ?></i>
</small>
<div class="d-md-none mb-3"></div>
<?php } ?>