diff --git a/settings/templatetags/template_filters.py b/settings/templatetags/template_filters.py index b013912e..fb26e631 100644 --- a/settings/templatetags/template_filters.py +++ b/settings/templatetags/template_filters.py @@ -160,6 +160,10 @@ def random_social(value): def random3(value): return random.randrange(0,3) +@register.filter +def random4(value): + return random.randrange(0,4) + @register.filter def random5(value): return random.randrange(0,5) diff --git a/templates/client/blank.html b/templates/client/blank.html index 8ff32e89..ebc89246 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -159,7 +159,7 @@ This template include basic anf main styles and js files, {% include 'client/popups/callback.html' %} {% block popup_banner %} - {% if not request.COOKIES.popover_test2 %} + {% if not request.COOKIES.popover_test1 %} {% if theme_for_filter %} @@ -199,7 +199,7 @@ This template include basic anf main styles and js files, {% if r == 4 %} {% include 'client/popups/cemat_banner1.html' %} {% endif %} - {% if r == 5 %} + {% if r == 0 %} {% include 'client/popups/cemat_banner2.html' %} {% endif %} {% endwith %} diff --git a/templates/client/includes/banners/under_search.html b/templates/client/includes/banners/under_search.html index ea2f6dbb..4d80cf36 100644 --- a/templates/client/includes/banners/under_search.html +++ b/templates/client/includes/banners/under_search.html @@ -2,23 +2,18 @@ {% load template_filters %}
- {% else %}
- {% if False|random3 == 2 %}
-
- {% else %}
-
- {% endif %}
- {% endif %}
- {% endcomment %}
-
- {% comment %}
- {% if False|fourth %}
-
- {% else %}
-
- {% endif %}
- {% endcomment %}
+ {% with r=False|random4 %}
+ {% ifequal r 0 %}
+
+ {% endifequal %}
+ {% ifequal r 1 %}
+
+ {% endifequal %}
+ {% ifequal r 2 %}
+
+ {% endifequal %}
+ {% ifequal r 3 %}
+
+ {% endifequal %}
+ {% endwith %}