mainView.php function for rendering navBox; templates changes and updates