Use last page option if parent is not set

This commit is contained in:
Andy Miller
2017-04-19 12:10:00 -06:00
parent 9c4f7ee185
commit da5f91c33c
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
# v1.4.0
## 04/xx/2017
1. [](#new)
* Added ability to add new pages/folders while editing existing page
1. [](#improved)
* Initialize theme in Admin Plugin [#1069](https://github.com/getgrav/grav-plugin-admin/pull/1069)
* Use new system configuration entries for username and password format
@@ -11,6 +13,7 @@
* Fix UI performance issue in the dashboard [#1064](https://github.com/getgrav/grav-plugin-admin/issues/1064)
1. [](#bugfix)
* Fixed issue with parent not working with custom slug [#1068](https://github.com/getgrav/grav-plugin-admin/issues/1068)
* Fixed issue with new page modal not remembering last choice [#1072](https://github.com/getgrav/grav-plugin-admin/issues/1072)
# v1.3.3
## 04/12/2017

View File

@@ -1,7 +1,9 @@
{% extends "forms/fields/pages/pages.html.twig" %}
{% block input %}
{% set value = admin.page.parent.rawRoute %}
{% if value is empty %}
{% set value = admin.getLastPageRoute %}
{% endif %}
{% set defaults = {show_root:true, show_all:true, show_slug:true} %}
{% set field = field|merge(defaults) %}
{{ parent() }}