Skip to content

armgit / Vvveb

Public Imported from GitHub
0

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

Default page title fix, changed if class macro

givanzb2c31dfe3a46
diff --git a/app/template/category/category.tpl b/app/template/category/category.tpl
index c7fe53e..a4f9d3b 100755
--- a/app/template/category/category.tpl
+++ b/app/template/category/category.tpl
@@ -1,7 +1 @@
-import(common.tpl)
-
-head > title = $this->global['site']['title']
-head > meta[name="description"]|content = $this->global['site']['meta_description']
-head > meta[name="keywords"]|content = $this->global['site']['meta_keywords']
-
-
+import(common.tpl)
\ No newline at end of file
diff --git a/app/template/checkout/confirm.tpl b/app/template/checkout/confirm.tpl
index fc98a54..822dc73 100755
--- a/app/template/checkout/confirm.tpl
+++ b/app/template/checkout/confirm.tpl
@@ -1,6 +1,6 @@
//keep post values
input|value = <?php if (isset($_POST['@@__name__@@'])) echo $_POST['@@__name__@@'];?>
-[data-v-order_id] = $this->order_id
+[data-v-order-*] = $this->order['@@__data-v-order-*__@@']
import(common.tpl)
diff --git a/app/template/common.tpl b/app/template/common.tpl
index 61182ce..e94030d 100755
--- a/app/template/common.tpl
+++ b/app/template/common.tpl
@@ -1,5 +1,6 @@
// example <div data-v-copy-from="index.html,#element">
[data-v-copy-from]|outerHTML = from(@@__data-v-copy-from:([^\,]+)__@@|@@__data-v-copy-from:[^\,]+\,([^\,]+)__@@)
+[data-v-save-global]|outerHTML = from(@@__data-v-save-global:([^\,]+)__@@|@@__data-v-save-global:[^\,]+\,([^\,]+)__@@)
a[data-v-url]|href = <?php echo htmlentities(Vvveb\url('@@__data-v-url__@@'));?>
form[data-v-url]|action = <?php echo htmlentities(Vvveb\url('@@__data-v-url__@@'));?>
@@ -54,13 +55,20 @@ if (isset($this->global) && $path) {
}
?>
+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);
+}
+?>
+
head > link[hreflang]|deleteAllButFirst
head > link[hreflang]|before = <?php
if (isset($this->hreflang)) {
- foreach ($this->hreflang as $lang => $url) {
-?>
+ foreach ($this->hreflang as $lang => $url) { ?>
head > link[hreflang]|hreflang = $lang
head > link[hreflang]|href = $url
@@ -68,4 +76,8 @@ head > link[hreflang]|before = <?php
head > link[hreflang]|after = <?php
}
}
-?>
\ No newline at end of file
+?>
+
+head > title = <?php echo $this->global['site']['description']['title'] ?? '@@__innerText__@@';?>
+head > meta[name="description"]|content = <?php echo $this->global['site']['description']['meta-description'] ?? '@@__content__@@';?>
+head > meta[name="keywords"]|content = <?php echo $this->global['site']['description']['meta-keywords'] ?? '@@__content__@@';?>
diff --git a/app/template/components/checkout/payment.tpl b/app/template/components/checkout/payment.tpl
index 46a34c3..a1ce476 100755
--- a/app/template/components/checkout/payment.tpl
+++ b/app/template/components/checkout/payment.tpl
@@ -27,7 +27,7 @@ if($payments && is_array($payments['payment'])) {
@payment img[data-v-payment-*]|src = $payment['@@__data-v-payment-(*)__@@']
- @payment [data-v-payment-description]|innerText = <?php echo $payment['@@__data-v-payment-(*)__@@'];?>
+ @payment [data-v-payment-render]|innerText = <?php echo $payment['@@__data-v-payment-(*)__@@'] ?? '';?>
@payment [data-v-payment-*]|innerText = $payment['@@__data-v-payment-(*)__@@']
@payment a[data-v-payment-*]|href = $payment['@@__data-v-payment-(*)__@@']
diff --git a/app/template/components/site.tpl b/app/template/components/site.tpl
index b61637e..b59c1bc 100755
--- a/app/template/components/site.tpl
+++ b/app/template/components/site.tpl
@@ -5,6 +5,7 @@
//$site = \Vvveb\session('site');
?>
+[data-v-component-site] [data-v-site-description-*]|innerText = $site['description']['@@__data-v-site-description-(*)__@@']
[data-v-component-site] [data-v-site-*]|innerText = $site['@@__data-v-site-(*)__@@']
[data-v-component-site] img[data-v-site-*]|src = $site['@@__data-v-site-(*)__@@']
[data-v-component-site] a[data-v-site-*]|href = $site['@@__data-v-site-(*)__@@']
diff --git a/app/template/content/index.tpl b/app/template/content/index.tpl
index c7fe53e..a4f9d3b 100755
--- a/app/template/content/index.tpl
+++ b/app/template/content/index.tpl
@@ -1,7 +1 @@
-import(common.tpl)
-
-head > title = $this->global['site']['title']
-head > meta[name="description"]|content = $this->global['site']['meta_description']
-head > meta[name="keywords"]|content = $this->global['site']['meta_keywords']
-
-
+import(common.tpl)
\ No newline at end of file
diff --git a/app/template/error404.tpl b/app/template/error404.tpl
index 93951ca..0da55b9 100755
--- a/app/template/error404.tpl
+++ b/app/template/error404.tpl
@@ -1,5 +1,4 @@
import(common.tpl)
-import(ifmacros.tpl)
[data-v-exception-*]|innerText = $this->@@__data-v-exception-(*)__@@
@@ -16,4 +15,4 @@ foreach ($this->lines as $index => $line) {?>
} ?>
body|prepend = <?php $debug = defined('DEBUG') && DEBUG;?>
-[data-debug]|if_exists = $debug
+[data-debug]|if_exists = $debug
\ No newline at end of file
diff --git a/app/template/error500.tpl b/app/template/error500.tpl
index 5b4ef03..312a639 100755
--- a/app/template/error500.tpl
+++ b/app/template/error500.tpl
@@ -1,5 +1,4 @@
import(common.tpl)
-import(ifmacros.tpl)
[data-v-exception-*]|innerText = $this->@@__data-v-exception-(*)__@@
diff --git a/app/template/ifmacros.tpl b/app/template/ifmacros.tpl
index 7eda0ce..94e4ad2 100755
--- a/app/template/ifmacros.tpl
+++ b/app/template/ifmacros.tpl
@@ -19,27 +19,5 @@ if (!@($condition) || (isset($vvveb_is_page_edit) && $vvveb_is_page_edit)) {
[data-v-if]|addClass = <?php if ((isset($vvveb_is_page_edit) && $vvveb_is_page_edit) && !$condition) echo 'vvveb-hidden'?>
[data-v-if-not]|addClass = <?php if ((isset($vvveb_is_page_edit) && $vvveb_is_page_edit) && $condition) echo 'vvveb-hidden'?>
-
-
-
-//class if
-[data-v-class-if-*]|addClass = <?php
-@@macro RemoveClass("@@__data-v-class-if-(.+)__@@")@@
-$condition = @@macro IfCondition("@@__data-v-class-if-*__@@")@@;
-if (($condition)/* || (isset($vvveb_is_page_edit) && $vvveb_is_page_edit)*/) {
- echo '@@__data-v-class-if-(.+)__@@';
-}
-
-@@macro RemoveClass("@@__data-v-class-if-not-*__@@")@@
-?>
-
-
-
-//class if not
-[data-v-class-if-not-*]|addClass = <?php
-@@macro RemoveClass("@@__data-v-class-if-not-(.+)__@@")@@
-$condition = @@macro IfCondition("@@__data-v-class-if-not-*__@@")@@;
-if (!($condition)/* || (isset($vvveb_is_page_edit) && $vvveb_is_page_edit)*/) {
- echo '@@__data-v-class-if-not-(.+)__@@';
-}
-?>
+[data-v-class-if-*]|addClass = <?php @@macro IfClass("")@@?>
+[data-v-class-if-not-*]|addClass = <?php @@macro IfClass("")@@?>
diff --git a/app/template/index.tpl b/app/template/index.tpl
index 6caae32..a4f9d3b 100755
--- a/app/template/index.tpl
+++ b/app/template/index.tpl
@@ -1,7 +1 @@
-import(common.tpl)
-
-head > title = $this->global['site']['title']
-head > meta[name="description"]|content = $this->global['site']['meta-description']
-head > meta[name="keywords"]|content = $this->global['site']['meta-keywords']
-
-
+import(common.tpl)
\ No newline at end of file
diff --git a/app/template/product/index.tpl b/app/template/product/index.tpl
index c7fe53e..a4f9d3b 100755
--- a/app/template/product/index.tpl
+++ b/app/template/product/index.tpl
@@ -1,7 +1 @@
-import(common.tpl)
-
-head > title = $this->global['site']['title']
-head > meta[name="description"]|content = $this->global['site']['meta_description']
-head > meta[name="keywords"]|content = $this->global['site']['meta_keywords']
-
-
+import(common.tpl)
\ No newline at end of file