/**
  * Generate the module
  */
 protected function compile()
 {
     global $objPage;
     $this->Template->project = '';
     $this->Template->referer = 'javascript:history.go(-1)';
     $this->Template->back = $GLOBALS['TL_LANG']['MSC']['goBack'];
     // Get the Project item
     $objProject = \PortfolioProjectModel::findPublishedByParentAndIdOrAlias(\Input::get('items'), $this->portfolio_project_categories);
     if ($objProject === null) {
         // Do not index or cache the page
         $objPage->noSearch = 1;
         $objPage->cache = 0;
         // Send a 404 header
         header('HTTP/1.1 404 Not Found');
         $this->Template->projects = '<p class="error">' . sprintf($GLOBALS['TL_LANG']['MSC']['invalidPage'], \Input::get('items')) . '</p>';
         return;
     }
     $arrProject = $this->parseProject($objProject);
     $this->Template->project = $arrProject;
     // Get the Client items
     $objClient = \PortfolioClientModel::findPublishedByParentAndIdOrAlias($objProject->clientID, $this->portfolio_project_categories);
     $this->Template->client = '';
     if ($objClient !== null) {
         $this->Template->client = $this->parseClient($objClient);
     }
     // Overwrite the page title (see #2853 and #4955)
     if ($objProject->title != '') {
         $objPage->pageTitle = strip_tags(strip_insert_tags($objProject->title));
     }
 }