Tags are sorted alphabetically
This commit is contained in:
parent
bb0e844e4e
commit
b8fedc1297
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,9 @@
|
|||
<div class="unit tags">
|
||||
<h1>tags (<?php echo count($this->context->transport->post->sharedTag) ?>)</h1>
|
||||
<ul>
|
||||
<?php foreach ($this->context->transport->post->sharedTag as $tag): ?>
|
||||
<?php $tags = $this->context->transport->post->sharedTag ?>
|
||||
<?php uasort($tags, function($a, $b) { return strnatcasecmp($a->name, $b->name); }) ?>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<li title="<?php echo $tag->name ?>">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?php echo $tag->name ?>
|
||||
|
|
Loading…
Reference in a new issue