Преглед на файлове

Enable opening links within the live preview panel

Nick Moreton преди 2 години
родител
ревизия
13c5993f82
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      bakerydemo/templates/base.html

+ 5 - 0
bakerydemo/templates/base.html

@@ -17,6 +17,11 @@
         </title>
         <meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% endif %}">
         <meta name="viewport" content="width=device-width, initial-scale=1">
+        
+        {# Force all links in the live preview panel to be opened in a new tab #}
+        {% if request.in_preview_panel %}
+            <base target="_blank">
+        {% endif %}
 
         <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
         {% fontawesome_css %}