2013-10-17 42 views
0

我使用的是Joomla 2.5。成功登錄後Joomla 2.5禁用模塊

我想禁用一個模塊,只有當我的用戶成功登錄到它。

換句話說,我想只顯示一個模塊給沒有登錄的用戶。

任何人都請親切地幫助我。

回答

1

試試這個:

if ($user->guest) { 
    // If user is not loged in 
    // <jdoc:include type="modules" name="position" /> 
} else { 
    // User is loged in 
    // <jdoc:include type="modules" name="position" /> 
} 
+0

感謝您的回答,但我必須編寫此代碼。 – newcomer

+0

你在哪裏加載登錄模塊? – lumos