我正在尝试编辑joomla主页。主页上有mod_articles_category的最新文章模块。一切正常,但在文章中显示作者:超级用户。
我想显示的不是真实姓名,而是用户名。我在努力:
<?php echo $item->author; ?>
但它不起作用。
此添加应为您提供作者用户名。
echo JFactory::getUser($this->item->created_by)->username;
我正在尝试编辑joomla主页。主页上有mod_articles_category的最新文章模块。一切正常,但在文章中显示作者:超级用户。
我想显示的不是真实姓名,而是用户名。我在努力:
<?php echo $item->author; ?>
但它不起作用。
此添加应为您提供作者用户名。
echo JFactory::getUser($this->item->created_by)->username;