set_global('item', $item); $template->set_global('children', $item->children()); $template->set_global('parents', $item->parents()); $template->set_global('theme', $theme); $template->content = new View("photo.html"); $login_view = new View("login.html"); $user = Session::instance()->get("user", null); $login_view->logged_in = !empty($user); $template->set_global("login", $login_view); print $template->render(); } }