Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

arrayPath update for component attributes

givanz26d98ad38a3d
diff --git a/admin/template/components/notifications.tpl b/admin/template/components/notifications.tpl
index a90f807..53d31e6 100644
--- a/admin/template/components/notifications.tpl
+++ b/admin/template/components/notifications.tpl
@@ -50,11 +50,12 @@ $count = $notificationComponent['count'] ?? 0;
@notifications [data-v-notification-*] = <?php
$name = '@@__data-v-notification-(*)__@@';
$default = '@@__innerHtml__@@';
-$path = str_replace('-', '.', $name);
-if ($path == 'count') {
+if ($name == 'count') {
echo $count;
} else
-if (isset($notifications) && $path) {
- echo \Vvveb\arrayPath($notifications, $path);
-} else echo $default;
+if (isset($notifications) && $name) {
+ echo \Vvveb\arrayPath($notifications, $name, '','-');
+} else {
+ echo $default;
+}
?>
diff --git a/app/template/common.tpl b/app/template/common.tpl
index e94030d..55f8f41 100755
--- a/app/template/common.tpl
+++ b/app/template/common.tpl
@@ -33,33 +33,29 @@ $vvveb_is_page_edit = Vvveb\isEditor();
[data-v-global-*]|innerText = <?php
$name = '@@__data-v-global-(*)__@@';
-$path = str_replace('-', '.', $name);
-if (isset($this->global) && $path) {
- echo \Vvveb\arrayPath($this->global, $path);
+if (isset($this->global) && $name) {
+ echo \Vvveb\arrayPath($this->global, $name, '', '-');
}
?>
img[data-v-global-*]|src = <?php
$name = '@@__data-v-global-(*)__@@';
-$path = str_replace('-', '.', $name);
-if (isset($this->global) && $path) {
- echo \Vvveb\arrayPath($this->global, $path);
+if (isset($this->global) && $name) {
+ echo \Vvveb\arrayPath($this->global, $name, '', '-');
}
?>
a[data-v-global-*]|href = <?php
$name = '@@__data-v-global-(*)__@@';
-$path = str_replace('-', '.', $name);
-if (isset($this->global) && $path) {
- echo \Vvveb\arrayPath($this->global, $path);
+if (isset($this->global) && $name) {
+ echo \Vvveb\arrayPath($this->global, $name, '', '-');
}
?>
link[data-v-global-*]|href = <?php
$name = '@@__data-v-global-(*)__@@';
-$path = str_replace('-', '.', $name);
-if (isset($this->global) && $path) {
- echo \Vvveb\arrayPath($this->global, $path);
+if (isset($this->global) && $name) {
+ echo \Vvveb\arrayPath($this->global, $name, '', '-');
}
?>