diff --git a/home/templates/home/modules/news-tweets.html b/home/templates/home/modules/news-tweets.html
index c0d5c3b47..9447d3aa5 100644
--- a/home/templates/home/modules/news-tweets.html
+++ b/home/templates/home/modules/news-tweets.html
@@ -3,8 +3,6 @@
{{ page.latest_news_title }}
-
diff --git a/home/templates/home/modules/statistics.html b/home/templates/home/modules/statistics.html
index 6bb9dc89e..bdc25a5dd 100644
--- a/home/templates/home/modules/statistics.html
+++ b/home/templates/home/modules/statistics.html
@@ -1,5 +1,6 @@
{% load static responsive iati_tags %}
+
{% if page.testimonial %}
@@ -30,3 +31,4 @@
+
diff --git a/iati/settings/base.py b/iati/settings/base.py
index ce1e4af3f..6af99fd2e 100644
--- a/iati/settings/base.py
+++ b/iati/settings/base.py
@@ -653,3 +653,5 @@
}
COMPRESS_OFFLINE = True
+
+IATI_STANDARD_LATEST_VERSION = "2.03"
diff --git a/iati/templates/base.html b/iati/templates/base.html
index c93ab15b2..05b8bcffd 100644
--- a/iati/templates/base.html
+++ b/iati/templates/base.html
@@ -39,6 +39,9 @@
{% block extra_css %}
{# Override this in templates to add extra stylesheets #}
{% endblock %}
+
+ {% block html_header_seo %}
+ {% endblock %}
diff --git a/iati_standard/models.py b/iati_standard/models.py
index 1d13e9c0d..b2213af1d 100644
--- a/iati_standard/models.py
+++ b/iati_standard/models.py
@@ -1,10 +1,12 @@
"""Model definitions for the iati_standard app."""
import os
+import re
from bs4 import BeautifulSoup
from datetime import datetime
from django import forms
+from django.conf import settings
from django.db.models import JSONField
from django.db import models
from django.utils.functional import cached_property
@@ -397,10 +399,35 @@ def save(self, *args, **kwargs):
class ActivityStandardPage(AbstractGithubPage):
- """A model for the Activity Standard Page, an IATI reference page."""
+ """A model for the Activity Standard Page, an IATI reference page.
+
+ Used for Standard reference pages like /en/iati-standard/202/
+ And guidance developer pages like /en/guidance/developer/
+ """
template = 'iati_standard/activity_standard_page.html'
+ def is_older_version_of_standard(self):
+ """Is it an older version of the standard? Return Boolean."""
+ url = self.get_url()
+ if re.match(r"^\/\w+\/iati-standard\/\d", url):
+ regex = r"^\/\w+\/iati-standard\/" + settings.IATI_STANDARD_LATEST_VERSION.replace(".", "") + r"\/"
+ if not re.match(regex, url):
+ return True
+ return False
+
+ def get_sitemap_urls(self, request=None):
+ """If it's an older version of the standard, we don't want it indexed."""
+ if self.is_older_version_of_standard():
+ return []
+ else:
+ return [
+ {
+ 'location': self.get_full_url(request),
+ 'lastmod': (self.last_published_at or self.latest_revision_created_at),
+ }
+ ]
+
class StandardGuidancePage(AbstractGithubPage):
"""A model for the Standard Guidance Page, an IATI reference page."""
diff --git a/iati_standard/templates/iati_standard/activity_standard_page.html b/iati_standard/templates/iati_standard/activity_standard_page.html
index cd293fd6f..0e97a1eb2 100644
--- a/iati_standard/templates/iati_standard/activity_standard_page.html
+++ b/iati_standard/templates/iati_standard/activity_standard_page.html
@@ -23,6 +23,10 @@
{% endblock %}
+{% block html_header_seo %}
+{% if page.is_older_version_of_standard %}
{% endif %}
+{% endblock %}
+
{% block content %}
{% get_current_language as LANGUAGE_CODE %}
diff --git a/patterns/assets/css/modules/_stats.scss b/patterns/assets/css/modules/_stats.scss
index 99c589e99..e2b75a514 100644
--- a/patterns/assets/css/modules/_stats.scss
+++ b/patterns/assets/css/modules/_stats.scss
@@ -8,7 +8,6 @@
}
.stat {
- background-color: #fff;
box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.1);
.stats--grid & {
border-left: 3px solid $iati-ocean;