shinoka7 6 ani în urmă
părinte
comite
eba839c46e
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/server/views/modal/create_page.html

+ 1 - 1
src/server/views/modal/create_page.html

@@ -72,7 +72,7 @@
             // modify href
             // modify href
             const value = $(this).val();
             const value = $(this).val();
             const pageName = (value === 'children') ? '_template' : '__template';
             const pageName = (value === 'children') ? '_template' : '__template';
-            const truePath = "{{ page.path || path | addTrailingSlash }}";
+            const truePath = "{% if page.path || path %}{{ page.path || path | addTrailingSlash }}{% else %}{{ page.path || path }}{% endif %}"
             const link = truePath + pageName + '#edit-form';
             const link = truePath + pageName + '#edit-form';
             $('#link-to-template').attr('href', link);
             $('#link-to-template').attr('href', link);
           });
           });