Hello All,
I'm having a bit of hard time understanding the exact purpose of files under "ViewPublic".
Let's say for example, the "XenForo_ViewPublic_Forum_List" view has "renderHtml" method that just initializes "renderedNodes" variable that's gonna be used in template. Couldn't we initialize the same in controller method itself as we initialize other variable as shown following?
$viewParams = array(
'nodeList' => $this->_getNodeModel()->getNodeDataForListDisplay(false, 0),
'onlineUsers' => $this->_getSessionActivityList(),
'boardTotals' => $this->_getBoardTotals(),
'canViewMemberList' => $this->getModelFromCache('XenForo_Model_User')->canViewMemberList(),
'threads' => $threads,
'profilePosts' => $profilePosts,
'canUpdateStatus' => XenForo_Visitor::getInstance()->canUpdateStatus()
);
Thanks,
Sajal
I'm having a bit of hard time understanding the exact purpose of files under "ViewPublic".
Let's say for example, the "XenForo_ViewPublic_Forum_List" view has "renderHtml" method that just initializes "renderedNodes" variable that's gonna be used in template. Couldn't we initialize the same in controller method itself as we initialize other variable as shown following?
$viewParams = array(
'nodeList' => $this->_getNodeModel()->getNodeDataForListDisplay(false, 0),
'onlineUsers' => $this->_getSessionActivityList(),
'boardTotals' => $this->_getBoardTotals(),
'canViewMemberList' => $this->getModelFromCache('XenForo_Model_User')->canViewMemberList(),
'threads' => $threads,
'profilePosts' => $profilePosts,
'canUpdateStatus' => XenForo_Visitor::getInstance()->canUpdateStatus()
);
Thanks,
Sajal