mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Set Content-Type for stylesheets
This commit is contained in:
parent
572da5fa8a
commit
64ead69f4e
@ -98,13 +98,29 @@ class GoogleSitemapController extends Controller
|
||||
return str_replace('-', '\\', $class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the stylesheet for the sitemap index
|
||||
*
|
||||
* @return DBHTMLText
|
||||
*/
|
||||
public function styleSheetIndex()
|
||||
{
|
||||
return $this->renderWith('xml-sitemapindex');
|
||||
$html = $this->renderWith('xml-sitemapindex');
|
||||
$this->getResponse()->addHeader('Content-Type', 'text/xsl; charset="utf-8"');
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the stylesheet for the sitemap
|
||||
*
|
||||
* @return DBHTMLText
|
||||
*/
|
||||
public function styleSheet()
|
||||
{
|
||||
return $this->renderWith('xml-sitemap');
|
||||
$html = $this->renderWith('xml-sitemap');
|
||||
$this->getResponse()->addHeader('Content-Type', 'text/xsl; charset="utf-8"');
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>XML Sitemap</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="{$BaseHref}resources/wilr/silverstripe-googlesitemaps/css/style.css" />
|
||||
<link rel="stylesheet" href="$resourceURL(wilr/silverstripe-googlesitemaps:css/style.css)" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
|
@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>XML Sitemap</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="{$BaseHref}resources/wilr/silverstripe-googlesitemaps/css/style.css" />
|
||||
<link rel="stylesheet" href="$resourceURL(wilr/silverstripe-googlesitemaps:css/style.css)" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
|
Loading…
Reference in New Issue
Block a user