Skip to content

Commit

Permalink
Better fix for session-based parent overriding root page parents #1078
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Apr 21, 2017
1 parent b250039 commit 9fe0290
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Added back `Admin::initTheme()` relying on Grav fix [#1069](https://github.com/getgrav/grav-plugin-admin/pull/1069) as it conflicts ith Gantry5
* Fix for missing scrollbar when in full-size editor for Firefox [#1077](https://github.com/getgrav/grav-plugin-admin/issues/1077)
* Fix for overlay of Add-Page button in full-size editor [#1077](https://github.com/getgrav/grav-plugin-admin/issues/1077)
* Better fix for session-based parent overriding root page parents [#1078](https://github.com/getgrav/grav-plugin-admin/issues/1078)

# v1.4.1
## 04/19/2017
Expand Down
6 changes: 2 additions & 4 deletions themes/grav/templates/forms/fields/parents/parents.html.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{% extends "forms/fields/pages/pages.html.twig" %}

{% block input %}
{% if value is empty %}
{% set value = admin.getLastPageRoute %}
{% endif %}
{% set defaults = {show_root:true, show_all:true, show_slug:true} %}
{% set last_page_route = admin.page.getLastPageRoute %}
{% set defaults = {show_root:true, show_all:true, show_slug:true, default: last_page_route} %}
{% set field = field|merge(defaults) %}
{{ parent() }}
{% endblock %}

0 comments on commit 9fe0290

Please sign in to comment.