Skip to content

Commit

Permalink
Allow show_modular: true|false to work again in parents/pages field #…
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Apr 22, 2017
1 parent 9fe0290 commit 7422d39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* 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)
* Allow support for `Pages::getList()` with `show_modular` option [#1080](https://github.com/getgrav/grav-plugin-admin/issues/1080)

# v1.4.1
## 04/19/2017
Expand Down
3 changes: 2 additions & 1 deletion themes/grav/templates/forms/fields/pages/pages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
{% set show_all = field.show_all is same as(false) ? false : true %}
{% set show_fullpath = field.show_fullpath is same as(true) ? true : false %}
{% set show_slug = field.show_slug is same as(true) ? true : false %}
{% set show_modular = field.show_modular is same as(true) ? true : false %}
{% set limit_levels = field.limit_levels ?: false %}

{% set page_list = grav.pages.getList(start_page, 0, true, show_all, show_fullpath, show_slug, limit_levels) %}
{% set page_list = grav.pages.getList(start_page, 0, true, show_all, show_fullpath, show_slug, show_modular, limit_levels) %}

<div class="form-select-wrapper {{ field.size }}">
<select class="{{ field.classes }}" name="{{ (scope ~ field.name)|fieldName ~ (field.multiple ? '[]' : '') }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block input %}
{% set last_page_route = admin.page.getLastPageRoute %}
{% set defaults = {show_root:true, show_all:true, show_slug:true, default: last_page_route} %}
{% 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 7422d39

Please sign in to comment.