public static function setStyles($title = null) { $response = sfContext::getInstance()->getResponse(); $response->setTitle($title); $b = Website::getBrowser(); if (file_exists(SF_ROOT_DIR . "/www/css/frontend.css")) { $response->addStyleSheet("frontend"); } if (file_exists(SF_ROOT_DIR . "/www/css/print.css")) { $response->addStyleSheet("print"); } if (file_exists(SF_ROOT_DIR . "/www/css/" . $b["browser"] . $b['version'] . ".css")) { $response->addStyleSheet($b["browser"] . $b['version']); } if (file_exists(SF_ROOT_DIR . "/www/css/" . $b["browser"] . ".css")) { $response->addStyleSheet($b["browser"]); } }
public function setResponseParams($user = null) { $response = $this->getResponse(); if ($user) { $backend = $user->getBackend(); $type = $user->getType(); } else { $backend = 0; } // HTTP headers //$response->setContentType('text/xhtml'); //$response->setHttpHeader('Content-Language', 'fr'); //$response->setStatusCode(403); //$response->addVaryHttpHeader('Accept-Language'); //$response->addCacheControlHttpHeader('no-cache'); // Cookies //$response->setCookie($name, $content, $expire, $path, $domain); // Metas and page headers //$response->addMeta('robots', 'NONE'); //echo $this->pageDocument->getMetaKeywords(); $response->addMeta('keywords', $this->pageDocument->getMetaKeywords()); $response->addMeta('description', $this->pageDocument->getMetaDescription()); //$response->addMeta('language', $this->pageDocument->getMetaLanguage()); if ($this->pageDocument) { if ($backend && $type == "admin") { //$response->setCookie('pageId', $this->pageDocument->getId()); $response->setTitle($this->pageDocument->getId()); } else { if (!$this->pageTitle) { $this->pageTitle = $this->pageDocument->getNavigationTitle(); } $response->setTitle($this->pageTitle); } } $b = Website::getBrowser(); if (file_exists(SF_ROOT_DIR . "/www/css/frontend.css")) { $response->addStyleSheet("frontend"); } if (file_exists(SF_ROOT_DIR . "/www/css/print.css")) { $response->addStyleSheet("print"); } if (file_exists(SF_ROOT_DIR . "/www/css/" . $b["browser"] . $b['version'] . ".css")) { $response->addStyleSheet($b["browser"] . $b['version']); } if (file_exists(SF_ROOT_DIR . "/www/css/" . $b["browser"] . ".css")) { $response->addStyleSheet($b["browser"]); } }