Matthew Hawley
Well-known member
I am getting this error when I go the route for my custom addon (/directory). I don't get why I am getting this error because a lot of addons use viewParams in the controller public file. 
Server Error
Undefined variable: viewParams
	
	
	
		
				
			Server Error
Undefined variable: viewParams
- XenForo_Application::handlePhpError() in CF/Directory/ControllerPublic/Directory.php at line 10
- CF_Directory_ControllerPublic_Directory->actionIndex() in XenForo/FrontController.php at line 337
- XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
- XenForo_FrontController->run() in /home3/mcwh/public_html/xxx/index.php at line 13
		Code:
	
	<?php
class CF_Directory_ControllerPublic_Directory extends XenForo_ControllerPublic_Abstract
{
    public function actionIndex()
    {
        // send to template for display
        return $this->responseView('CF_Directory_Index', 'cf_directory_index', $viewParams);
   
    }
}
?> 
 
		
 
 
		 
 
		 
 
		 
 
		