title tag in a series list
Stephen Finucane
stephen at that.guru
Wed Aug 29 23:32:33 AEST 2018
On Mon, 2018-07-23 at 11:47 +0000, Ali Alnubani wrote:
> 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):
I genuinely have no idea what's going on here. I can get the value to
display in the body but not in the header block, even though I can
encode a static string there. I'm afraid more tinkering is all I can
suggest here.
If it helps, we are planning on adding a proper series page in 2.2/2.3
which should avoid the need for this. Who knows when I'll have time to
work on that though :(
Stephen
> 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
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
More information about the Patchwork
mailing list