title tag in a series list

Ali Alnubani alialnu at mellanox.com
Mon Jul 23 21:47:30 AEST 2018


Hi,

I'm trying to set the HTML title tag in a series filtered list as the series title instead of the project name.
I did something like the following, but it's not working (obviously):

diff --git a/patchwork/templates/patchwork/list.html b/patchwork/templates/patchwork/list.html
index 180c560..d7476d6 100644
--- a/patchwork/templates/patchwork/list.html
+++ b/patchwork/templates/patchwork/list.html
@@ -3,7 +3,13 @@
{% load person %}
{% load static %}

-{% block title %}{{project.name}}{% endblock %}
+{% if filters.applied_filters %}
+ {% for filter in filters.applied_filters %}
+  {% if filter.name ==  "Series" %}
+   {% block title %}{{filter.condition}}{% endblock %}
+  {% endif %}
+ {% endfor %}
+{% endif %}
{% block patch_active %}active{% endblock %}

{% block body %}


How can I get this to work?
Any suggestions for a better approach?

Thanks,
Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20180723/dcc9c41d/attachment.html>


More information about the Patchwork mailing list