Skip to content

Commit

Permalink
Allow full path render of oages in selector. (#1015)
Browse files Browse the repository at this point in the history
Full path is off by default.
  • Loading branch information
coder4life authored and rhukster committed Mar 14, 2017
1 parent 0abce5c commit 2bdd38e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions themes/grav/templates/forms/fields/pages/pages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
{% set depth = depth +1 %}
{% endif %}

{% set indent = depth == 0 ? '' : repeat('-',depth) ~ ' ' %}
{% set indent = depth == 0 ? '' : repeat('-', depth) ~ ' ' %}

{% for page in pages.children %}
{% if page.routable() or field.show_all %}
<option {% if page.route == value or (field.multiple and page.route in value) %}selected="selected"{% endif %} value="{{ page.route }}">
{{indent}} {{ page.menu }}
{% if field.show_fullpath %}
{{ page.route }}
{% else %}
{{indent}} {{ page.menu }}
{% endif %}
</option>
{% endif %}
{% if page.children|length > 0 and (field.show_modular or not page.modular()) %}

{{ _self.options(field, page,value, depth + 1) }}

{{ _self.options(field, page, value, depth + 1) }}
{% endif %}
{% endfor %}
{% endmacro %}
Expand Down

0 comments on commit 2bdd38e

Please sign in to comment.