aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Page.pm6
-rw-r--r--templates/website/header1
-rwxr-xr-xweb/index.cgi1
3 files changed, 7 insertions, 1 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index fddbc61d1..1b94f5c2b 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -205,6 +205,10 @@ sub template_vars ($%) {
$vars{rss} = '<link rel="alternate" type="application/rss+xml" title="' . $params{rss}[0] . '" href="' . $params{rss}[1] . '">';
}
+ if ($params{robots}) {
+ $vars{robots} = '<meta name="robots" content="' . $params{robots} . '">';
+ }
+
if ($q->{site} eq 'fixmystreet') {
my $home = !$params{title} && $ENV{SCRIPT_NAME} eq '/index.cgi' && !$ENV{QUERY_STRING};
$vars{heading_element_start} = $home ? '<h1 id="header">' : '<div id="header"><a href="/">';
@@ -279,7 +283,7 @@ sub header ($%) {
my $default_params = Cobrand::header_params(get_cobrand($q), $q, %params);
my %default_params = %{$default_params};
%params = (%default_params, %params);
- my %permitted_params = map { $_ => 1 } qw(title rss expires lastmodified template cachecontrol context status_code);
+ my %permitted_params = map { $_ => 1 } qw(title rss expires lastmodified template cachecontrol context status_code robots);
foreach (keys %params) {
croak "bad parameter '$_'" if (!exists($permitted_params{$_}));
}
diff --git a/templates/website/header b/templates/website/header
index 060d317cb..028d05506 100644
--- a/templates/website/header
+++ b/templates/website/header
@@ -5,6 +5,7 @@
<script type="text/javascript" src="/yui/utilities.js"></script>
<script type="text/javascript" src="/js.js"></script>
{{ $map_js }}
+ {{ $robots }}
<title>{{ $title }}{{ $site_title }}</title>
<style type="text/css">@import url("/css/core.css"); @import url("/css/main.css");</style>
diff --git a/web/index.cgi b/web/index.cgi
index 9666c2458..32b7de916 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -1010,6 +1010,7 @@ EOF
my %params = (
rss => [ _('Updates to this problem, FixMyStreet'), "/rss/$input_h{id}" ],
+ robots => 'index, nofollow',
title => $problem->{title}
);