aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/edit.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-08-12 17:43:19 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-08-12 17:43:19 +0200
commit2722f77adf442481fb37f795e92ac8af672b2ed1 (patch)
tree20ec1fe296e66276cc852e1d88e7da3f96052a19 /app/view/templates/edit.php
parentab324b42a3223b882145852c49a17bfa72099174 (diff)
downloadwcms-2722f77adf442481fb37f795e92ac8af672b2ed1.tar.gz
wcms-2722f77adf442481fb37f795e92ac8af672b2ed1.zip
disable javascript config option, close #114
Diffstat (limited to 'app/view/templates/edit.php')
-rw-r--r--app/view/templates/edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php
index 22dda20..dfb4dec 100644
--- a/app/view/templates/edit.php
+++ b/app/view/templates/edit.php
@@ -1,4 +1,6 @@
-<?php $this->layout('layout', ['title' => '✏ '.$page->title(), 'stylesheets' => [$css . 'edit.css'], 'favicon' => $page->favicon()]) ?>
+<?php
+
+$this->layout('layout', ['title' => '✏ '.$page->title(), 'stylesheets' => [$css . 'edit.css'], 'favicon' => $page->favicon()]) ?>
@@ -26,10 +28,14 @@
</main>
+<?php if(!Wcms\Config::disablejavascript()) { ?>
+
<script>
const pageid = '<?= $page->id() ?>';
let pagetitle = '<?= $page->title() ?>';
</script>
<script src="<?= Wcms\Model::jspath() ?>edit.bundle.js"></script>
+<?php } ?>
+
<?php $this->stop('page') ?> \ No newline at end of file