aboutsummaryrefslogtreecommitdiff
path: root/class/class.art.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-05-07 11:34:45 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-05-07 11:34:45 +0200
commit97d6db419e1782abaa554dc9b88c208835d1a8b4 (patch)
tree4effa38f18eb0249d0587902cf9e34efd784eb82 /class/class.art.php
parent8ad36569c333324614a864225d507972247f22be (diff)
downloadwcms-97d6db419e1782abaa554dc9b88c208835d1a8b4.tar.gz
wcms-97d6db419e1782abaa554dc9b88c208835d1a8b4.zip
W 2.1 M 0.1
Diffstat (limited to 'class/class.art.php')
-rw-r--r--class/class.art.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/class/class.art.php b/class/class.art.php
index 58653ca..2b03a7d 100644
--- a/class/class.art.php
+++ b/class/class.art.php
@@ -128,6 +128,22 @@ a:hover {}');
return $this->css;
}
+ public function csstemplate(App $app)
+ {
+ $data = [];
+ $temp = '';
+ if (!empty($this->template())) {
+ if ($app->exist($this->template()) and !in_array($this->template(), $data)) {
+ $template = $app->get($this->template());
+ $temp = $temp . $template->css($app);
+ $data[] = $template->id();
+
+ }
+
+ }
+ return $temp . $this->css;
+ }
+
public function md()
{
return $this->html;
@@ -192,6 +208,11 @@ a:hover {}');
}
+ public function template()
+ {
+ return $this->template;
+ }
+
@@ -254,7 +275,7 @@ a:hover {}');
public function setcss($css)
{
- if (strlen($css) < self::LEN and is_string($css)) {
+ if (strlen($css) < self::LENHTML and is_string($css)) {
$this->css = strip_tags(trim(strtolower($css)));
}
}
@@ -316,6 +337,15 @@ a:hover {}');
}
}
+ public function settemplate($template)
+ {
+ $template = strip_tags($template);
+ if (strlen($template) == 0) {
+ $template = 'NULL';
+ }
+ $this->template = $template;
+ }
+
}