mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 06:56:07 +02:00
Added an option for opening frontend pages in a new tab, in a separate tab (always the same) or in the current tab. (#1096)
This commit is contained in:
@@ -22,6 +22,7 @@ session:
|
||||
warnings:
|
||||
delete_page: true
|
||||
edit_mode: normal
|
||||
frontend_pages_target: _blank
|
||||
show_github_msg: true
|
||||
google_fonts: true
|
||||
enable_auto_updates_check: true
|
||||
|
||||
@@ -125,6 +125,16 @@ form:
|
||||
expert: Expert
|
||||
help: Auto will use blueprint if available, if none found, it will use "Expert" mode.
|
||||
|
||||
frontend_pages_target:
|
||||
type: select
|
||||
label: Open frontend pages in
|
||||
size: medium
|
||||
default: _blank
|
||||
options:
|
||||
_blank: New tab
|
||||
frontend_tab: Separate tab (always the same)
|
||||
_self: Current tab
|
||||
|
||||
google_fonts:
|
||||
type: toggle
|
||||
label: Use Google Fonts
|
||||
@@ -354,5 +364,3 @@ form:
|
||||
type: hidden
|
||||
label: Visitors history
|
||||
default: 20
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %}
|
||||
{% set preview_link = context.routable ? '<a class="button" target="_blank" href="' ~ preview_html ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
|
||||
{% set preview_target = config.plugins.admin.frontend_pages_target %}
|
||||
{% set preview_link = context.routable ? '<a class="button" target="' ~ preview_target ~ '" href="' ~ preview_html ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
|
||||
|
||||
{% macro loop(page, depth, twig_vars) %}
|
||||
{% set separator = twig_vars['config'].system.param_sep %}
|
||||
|
||||
Reference in New Issue
Block a user