Fallback to page slug in Pages list if title is empty

This commit is contained in:
Andy Miller
2019-02-05 16:41:53 -07:00
parent bfb0b8e702
commit c5c2930314
2 changed files with 4 additions and 1 deletions

View File

@@ -6,6 +6,9 @@
* Added new `Logs` section to tools to allow quick view of Grav log files
1. [](#improved)
* Better logic for delete action to support Ajax. Fixes Flex lists
1. [](#bugfix)
* Fallback to page `slug` in Pages list if title is empty [grav#2267](https://github.com/getgrav/grav/issues/2267)
* Fixes backup button issues with `;` param separator [#1602](https://github.com/getgrav/grav-plugin-admin/issues/1602) [#1502](https://github.com/getgrav/grav-plugin-admin/issues/1502)
# v1.9.0-rc.1
## 01/29/2019

View File

@@ -45,7 +45,7 @@
<div class="page-item__content">
<div class="page-item__content-name">
<span data-hint="{{ description|trim(' &bull; ')|raw }}" class="hint--top page-item__content-hint">
{% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title) %}
{% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title)|default(p.slug|titleize) %}
<a href="{{ page_url }}" class="page-edit">{{ page_label|e }}</a>
</span>
{% if p.language %}