我需要一个模块显示如下:
if (the user is logged in){
\\ module should be this html(1)
}else{
\\ module should be like this html(2)
}
这可能吗?
我应该在模板index.php?中添加sth
答案 0 :(得分:2)
$user = JFactory::getUser();
if ($user->id){
\\ module should be this html(1)
}else{
\\ module should be like this html(2)
}