mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 09:05:48 +00: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);
|
return str_replace('-', '\\', $class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the stylesheet for the sitemap index
|
||||||
|
*
|
||||||
|
* @return DBHTMLText
|
||||||
|
*/
|
||||||
public function styleSheetIndex()
|
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()
|
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>
|
<head>
|
||||||
<title>XML Sitemap</title>
|
<title>XML Sitemap</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>XML Sitemap</title>
|
<title>XML Sitemap</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user