AndrewSimm
Well-known member
In my widget I have that displays the author fullname if it exists or the username if the fullname does not exist.
In my controller I would like to order by the fullname if it exist and if it doesn't then use the username. Thoughts?
Code:
<xf:if is="$author.fullname">
<a href="{{ link('articles/author', $author) }}">{$author.fullname}</a>
<xf:else />
<a href="{{ link('articles/author', $author) }}">{$author.username}</a>
</xf:if>
In my controller I would like to order by the fullname if it exist and if it doesn't then use the username. Thoughts?
PHP:
$authors = $finder->order('fullname','ASC')->limit($limit)->fetch();
Last edited: